Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(399)

Unified Diff: Source/bindings/v8/ScriptCallStackFactory.cpp

Issue 23788005: Remove calls to HandleScope default ctor. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: code review (pfeldman) Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/v8/ScriptCallStackFactory.h ('k') | Source/bindings/v8/ScriptController.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « Source/bindings/v8/ScriptCallStackFactory.h ('k') | Source/bindings/v8/ScriptController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698