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

Unified Diff: Source/bindings/v8/custom/V8InjectedScriptManager.cpp

Issue 23788005: Remove calls to HandleScope default ctor. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: no fixme 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
Index: Source/bindings/v8/custom/V8InjectedScriptManager.cpp
diff --git a/Source/bindings/v8/custom/V8InjectedScriptManager.cpp b/Source/bindings/v8/custom/V8InjectedScriptManager.cpp
index 199b84cd120eeefbb4dd63614032b5c7dce8a3f0..0a7e1dd32232eb9a05036be379cd55b76edbedf5 100644
--- a/Source/bindings/v8/custom/V8InjectedScriptManager.cpp
+++ b/Source/bindings/v8/custom/V8InjectedScriptManager.cpp
@@ -68,10 +68,10 @@ static v8::Local<v8::Object> createInjectedScriptHostV8Wrapper(InjectedScriptHos
ScriptObject InjectedScriptManager::createInjectedScript(const String& scriptSource, ScriptState* inspectedScriptState, int id)
{
- v8::HandleScope handleScope;
+ v8::Isolate* isolate = inspectedScriptState->isolate();
+ v8::HandleScope handleScope(isolate);
v8::Local<v8::Context> inspectedContext = inspectedScriptState->context();
- v8::Isolate* isolate = inspectedContext->GetIsolate();
v8::Context::Scope contextScope(inspectedContext);
// Call custom code to create InjectedScripHost wrapper specific for the context
@@ -99,7 +99,7 @@ ScriptObject InjectedScriptManager::createInjectedScript(const String& scriptSou
bool InjectedScriptManager::canAccessInspectedWindow(ScriptState* scriptState)
{
- v8::HandleScope handleScope;
+ v8::HandleScope handleScope(scriptState->isolate());
v8::Local<v8::Context> context = scriptState->context();
v8::Local<v8::Object> global = context->Global();
if (global.IsEmpty())

Powered by Google App Engine
This is Rietveld 408576698