Commit f119b0ea authored by dcarney@chromium.org's avatar dcarney@chromium.org

thread isolate in accessors.cc

R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/23824002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16462 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent a8e5dd51
This diff is collapsed.
...@@ -88,34 +88,70 @@ class Accessors : public AllStatic { ...@@ -88,34 +88,70 @@ class Accessors : public AllStatic {
private: private:
// Accessor functions only used through the descriptor. // Accessor functions only used through the descriptor.
static MaybeObject* FunctionSetPrototype(JSObject* object, Object*, void*); static MaybeObject* FunctionSetPrototype(Isolate* isolate,
static MaybeObject* FunctionGetPrototype(Object* object, void*); JSObject* object,
static MaybeObject* FunctionGetLength(Object* object, void*); Object*,
static MaybeObject* FunctionGetName(Object* object, void*); void*);
static MaybeObject* FunctionGetArguments(Object* object, void*); static MaybeObject* FunctionGetPrototype(Isolate* isolate,
static MaybeObject* FunctionGetCaller(Object* object, void*); Object* object,
static MaybeObject* ArraySetLength(JSObject* object, Object*, void*); void*);
static MaybeObject* ArrayGetLength(Object* object, void*); static MaybeObject* FunctionGetLength(Isolate* isolate,
static MaybeObject* StringGetLength(Object* object, void*); Object* object,
static MaybeObject* ScriptGetName(Object* object, void*); void*);
static MaybeObject* ScriptGetId(Object* object, void*); static MaybeObject* FunctionGetName(Isolate* isolate, Object* object, void*);
static MaybeObject* ScriptGetSource(Object* object, void*); static MaybeObject* FunctionGetArguments(Isolate* isolate,
static MaybeObject* ScriptGetLineOffset(Object* object, void*); Object* object,
static MaybeObject* ScriptGetColumnOffset(Object* object, void*); void*);
static MaybeObject* ScriptGetData(Object* object, void*); static MaybeObject* FunctionGetCaller(Isolate* isolate,
static MaybeObject* ScriptGetType(Object* object, void*); Object* object,
static MaybeObject* ScriptGetCompilationType(Object* object, void*); void*);
static MaybeObject* ScriptGetLineEnds(Object* object, void*); static MaybeObject* ArraySetLength(Isolate* isolate,
static MaybeObject* ScriptGetContextData(Object* object, void*); JSObject* object,
static MaybeObject* ScriptGetEvalFromScript(Object* object, void*); Object*,
static MaybeObject* ScriptGetEvalFromScriptPosition(Object* object, void*); void*);
static MaybeObject* ScriptGetEvalFromFunctionName(Object* object, void*); static MaybeObject* ArrayGetLength(Isolate* isolate, Object* object, void*);
static MaybeObject* StringGetLength(Isolate* isolate, Object* object, void*);
static MaybeObject* ScriptGetName(Isolate* isolate, Object* object, void*);
static MaybeObject* ScriptGetId(Isolate* isolate, Object* object, void*);
static MaybeObject* ScriptGetSource(Isolate* isolate, Object* object, void*);
static MaybeObject* ScriptGetLineOffset(Isolate* isolate,
Object* object,
void*);
static MaybeObject* ScriptGetColumnOffset(Isolate* isolate,
Object* object,
void*);
static MaybeObject* ScriptGetData(Isolate* isolate, Object* object, void*);
static MaybeObject* ScriptGetType(Isolate* isolate, Object* object, void*);
static MaybeObject* ScriptGetCompilationType(Isolate* isolate,
Object* object,
void*);
static MaybeObject* ScriptGetLineEnds(Isolate* isolate,
Object* object,
void*);
static MaybeObject* ScriptGetContextData(Isolate* isolate,
Object* object,
void*);
static MaybeObject* ScriptGetEvalFromScript(Isolate* isolate,
Object* object,
void*);
static MaybeObject* ScriptGetEvalFromScriptPosition(Isolate* isolate,
Object* object,
void*);
static MaybeObject* ScriptGetEvalFromFunctionName(Isolate* isolate,
Object* object,
void*);
// Helper functions. // Helper functions.
static Object* FlattenNumber(Object* value); static Object* FlattenNumber(Isolate* isolate, Object* value);
static MaybeObject* IllegalSetter(JSObject*, Object*, void*); static MaybeObject* IllegalSetter(Isolate* isolate,
static Object* IllegalGetAccessor(Object* object, void*); JSObject*,
static MaybeObject* ReadOnlySetAccessor(JSObject*, Object* value, void*); Object*,
void*);
static Object* IllegalGetAccessor(Isolate* isolate, Object* object, void*);
static MaybeObject* ReadOnlySetAccessor(Isolate* isolate,
JSObject*,
Object* value,
void*);
}; };
} } // namespace v8::internal } } // namespace v8::internal
......
...@@ -341,7 +341,7 @@ MaybeObject* JSObject::GetPropertyWithCallback(Object* receiver, ...@@ -341,7 +341,7 @@ MaybeObject* JSObject::GetPropertyWithCallback(Object* receiver,
AccessorDescriptor* callback = AccessorDescriptor* callback =
reinterpret_cast<AccessorDescriptor*>( reinterpret_cast<AccessorDescriptor*>(
Foreign::cast(structure)->foreign_address()); Foreign::cast(structure)->foreign_address());
MaybeObject* value = (callback->getter)(receiver, callback->data); MaybeObject* value = (callback->getter)(isolate, receiver, callback->data);
RETURN_IF_SCHEDULED_EXCEPTION(isolate); RETURN_IF_SCHEDULED_EXCEPTION(isolate);
return value; return value;
} }
...@@ -2832,7 +2832,8 @@ MaybeObject* JSObject::SetPropertyWithCallback(Object* structure, ...@@ -2832,7 +2832,8 @@ MaybeObject* JSObject::SetPropertyWithCallback(Object* structure,
AccessorDescriptor* callback = AccessorDescriptor* callback =
reinterpret_cast<AccessorDescriptor*>( reinterpret_cast<AccessorDescriptor*>(
Foreign::cast(structure)->foreign_address()); Foreign::cast(structure)->foreign_address());
MaybeObject* obj = (callback->setter)(this, value, callback->data); MaybeObject* obj = (callback->setter)(
isolate, this, value, callback->data);
RETURN_IF_SCHEDULED_EXCEPTION(isolate); RETURN_IF_SCHEDULED_EXCEPTION(isolate);
if (obj->IsFailure()) return obj; if (obj->IsFailure()) return obj;
return *value_handle; return *value_handle;
......
...@@ -347,8 +347,9 @@ union IeeeDoubleBigEndianArchType { ...@@ -347,8 +347,9 @@ union IeeeDoubleBigEndianArchType {
// AccessorCallback // AccessorCallback
struct AccessorDescriptor { struct AccessorDescriptor {
MaybeObject* (*getter)(Object* object, void* data); MaybeObject* (*getter)(Isolate* isolate, Object* object, void* data);
MaybeObject* (*setter)(JSObject* object, Object* value, void* data); MaybeObject* (*setter)(
Isolate* isolate, JSObject* object, Object* value, void* data);
void* data; void* data;
}; };
......
...@@ -104,7 +104,7 @@ TEST(StressHandles) { ...@@ -104,7 +104,7 @@ TEST(StressHandles) {
} }
static MaybeObject* TestAccessorGet(Object* object, void*) { static MaybeObject* TestAccessorGet(Isolate* isolate, Object* object, void*) {
return AllocateAfterFailures(); return AllocateAfterFailures();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment