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 {
private:
// Accessor functions only used through the descriptor.
static MaybeObject* FunctionSetPrototype(JSObject* object, Object*, void*);
static MaybeObject* FunctionGetPrototype(Object* object, void*);
static MaybeObject* FunctionGetLength(Object* object, void*);
static MaybeObject* FunctionGetName(Object* object, void*);
static MaybeObject* FunctionGetArguments(Object* object, void*);
static MaybeObject* FunctionGetCaller(Object* object, void*);
static MaybeObject* ArraySetLength(JSObject* object, Object*, void*);
static MaybeObject* ArrayGetLength(Object* object, void*);
static MaybeObject* StringGetLength(Object* object, void*);
static MaybeObject* ScriptGetName(Object* object, void*);
static MaybeObject* ScriptGetId(Object* object, void*);
static MaybeObject* ScriptGetSource(Object* object, void*);
static MaybeObject* ScriptGetLineOffset(Object* object, void*);
static MaybeObject* ScriptGetColumnOffset(Object* object, void*);
static MaybeObject* ScriptGetData(Object* object, void*);
static MaybeObject* ScriptGetType(Object* object, void*);
static MaybeObject* ScriptGetCompilationType(Object* object, void*);
static MaybeObject* ScriptGetLineEnds(Object* object, void*);
static MaybeObject* ScriptGetContextData(Object* object, void*);
static MaybeObject* ScriptGetEvalFromScript(Object* object, void*);
static MaybeObject* ScriptGetEvalFromScriptPosition(Object* object, void*);
static MaybeObject* ScriptGetEvalFromFunctionName(Object* object, void*);
static MaybeObject* FunctionSetPrototype(Isolate* isolate,
JSObject* object,
Object*,
void*);
static MaybeObject* FunctionGetPrototype(Isolate* isolate,
Object* object,
void*);
static MaybeObject* FunctionGetLength(Isolate* isolate,
Object* object,
void*);
static MaybeObject* FunctionGetName(Isolate* isolate, Object* object, void*);
static MaybeObject* FunctionGetArguments(Isolate* isolate,
Object* object,
void*);
static MaybeObject* FunctionGetCaller(Isolate* isolate,
Object* object,
void*);
static MaybeObject* ArraySetLength(Isolate* isolate,
JSObject* 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.
static Object* FlattenNumber(Object* value);
static MaybeObject* IllegalSetter(JSObject*, Object*, void*);
static Object* IllegalGetAccessor(Object* object, void*);
static MaybeObject* ReadOnlySetAccessor(JSObject*, Object* value, void*);
static Object* FlattenNumber(Isolate* isolate, Object* value);
static MaybeObject* IllegalSetter(Isolate* isolate,
JSObject*,
Object*,
void*);
static Object* IllegalGetAccessor(Isolate* isolate, Object* object, void*);
static MaybeObject* ReadOnlySetAccessor(Isolate* isolate,
JSObject*,
Object* value,
void*);
};
} } // namespace v8::internal
......
......@@ -341,7 +341,7 @@ MaybeObject* JSObject::GetPropertyWithCallback(Object* receiver,
AccessorDescriptor* callback =
reinterpret_cast<AccessorDescriptor*>(
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 value;
}
......@@ -2832,7 +2832,8 @@ MaybeObject* JSObject::SetPropertyWithCallback(Object* structure,
AccessorDescriptor* callback =
reinterpret_cast<AccessorDescriptor*>(
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);
if (obj->IsFailure()) return obj;
return *value_handle;
......
......@@ -347,8 +347,9 @@ union IeeeDoubleBigEndianArchType {
// AccessorCallback
struct AccessorDescriptor {
MaybeObject* (*getter)(Object* object, void* data);
MaybeObject* (*setter)(JSObject* object, Object* value, void* data);
MaybeObject* (*getter)(Isolate* isolate, Object* object, void* data);
MaybeObject* (*setter)(
Isolate* isolate, JSObject* object, Object* value, void* data);
void* data;
};
......
......@@ -104,7 +104,7 @@ TEST(StressHandles) {
}
static MaybeObject* TestAccessorGet(Object* object, void*) {
static MaybeObject* TestAccessorGet(Isolate* isolate, Object* object, void*) {
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