| Index: Source/bindings/v8/ScriptCallStackFactory.cpp
|
| diff --git a/Source/bindings/v8/ScriptCallStackFactory.cpp b/Source/bindings/v8/ScriptCallStackFactory.cpp
|
| index 22de5f8d8282566a7eb524c8392b7a202687caf0..1b52dd785d38e788d719f58ebde11f1b3849a48f 100644
|
| --- a/Source/bindings/v8/ScriptCallStackFactory.cpp
|
| +++ b/Source/bindings/v8/ScriptCallStackFactory.cpp
|
| @@ -82,27 +82,28 @@ static void toScriptCallFramesVector(v8::Handle<v8::StackTrace> stackTrace, Vect
|
| }
|
| }
|
|
|
| -static PassRefPtr<ScriptCallStack> createScriptCallStack(v8::Handle<v8::StackTrace> stackTrace, size_t maxStackSize, bool emptyStackIsAllowed)
|
| +static PassRefPtr<ScriptCallStack> createScriptCallStack(v8::Handle<v8::StackTrace> stackTrace, size_t maxStackSize, bool emptyStackIsAllowed, v8::Isolate* isolate)
|
| {
|
| ASSERT(v8::Context::InContext());
|
| - v8::HandleScope scope;
|
| + v8::HandleScope scope(isolate);
|
| Vector<ScriptCallFrame> scriptCallFrames;
|
| toScriptCallFramesVector(stackTrace, scriptCallFrames, maxStackSize, emptyStackIsAllowed);
|
| return ScriptCallStack::create(scriptCallFrames);
|
| }
|
|
|
| -PassRefPtr<ScriptCallStack> createScriptCallStack(v8::Handle<v8::StackTrace> stackTrace, size_t maxStackSize)
|
| +PassRefPtr<ScriptCallStack> createScriptCallStack(v8::Handle<v8::StackTrace> stackTrace, size_t maxStackSize, v8::Isolate* isolate)
|
| {
|
| - return createScriptCallStack(stackTrace, maxStackSize, true);
|
| + return createScriptCallStack(stackTrace, maxStackSize, true, isolate);
|
| }
|
|
|
| PassRefPtr<ScriptCallStack> createScriptCallStack(size_t maxStackSize, bool emptyStackIsAllowed)
|
| {
|
| if (!v8::Context::InContext())
|
| return 0;
|
| - v8::HandleScope handleScope;
|
| + v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
| + v8::HandleScope handleScope(isolate);
|
| v8::Handle<v8::StackTrace> stackTrace(v8::StackTrace::CurrentStackTrace(maxStackSize, stackTraceOptions));
|
| - return createScriptCallStack(stackTrace, maxStackSize, emptyStackIsAllowed);
|
| + return createScriptCallStack(stackTrace, maxStackSize, emptyStackIsAllowed, isolate);
|
| }
|
|
|
| PassRefPtr<ScriptCallStack> createScriptCallStackForConsole(size_t maxStackSize)
|
| @@ -128,8 +129,9 @@ PassRefPtr<ScriptCallStack> createScriptCallStack(ScriptState*, size_t maxStackS
|
|
|
| PassRefPtr<ScriptArguments> createScriptArguments(const v8::FunctionCallbackInfo<v8::Value>& v8arguments, unsigned skipArgumentCount)
|
| {
|
| - v8::HandleScope scope;
|
| - v8::Local<v8::Context> context = v8::Context::GetCurrent();
|
| + v8::Isolate* isolate = v8arguments.GetIsolate();
|
| + v8::HandleScope scope(isolate);
|
| + v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
| ScriptState* state = ScriptState::forContext(context);
|
|
|
| Vector<ScriptValue> arguments;
|
|
|