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

Side by Side Diff: Source/bindings/core/v8/PageScriptDebugServer.cpp

Issue 451013003: Rename V8WindowShell to WindowProxy (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 Google Inc. All rights reserved. 2 * Copyright (c) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 19 matching lines...) Expand all
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "bindings/core/v8/PageScriptDebugServer.h" 32 #include "bindings/core/v8/PageScriptDebugServer.h"
33 33
34 #include "bindings/core/v8/DOMWrapperWorld.h" 34 #include "bindings/core/v8/DOMWrapperWorld.h"
35 #include "bindings/core/v8/ScriptController.h" 35 #include "bindings/core/v8/ScriptController.h"
36 #include "bindings/core/v8/ScriptSourceCode.h" 36 #include "bindings/core/v8/ScriptSourceCode.h"
37 #include "bindings/core/v8/V8Binding.h" 37 #include "bindings/core/v8/V8Binding.h"
38 #include "bindings/core/v8/V8ScriptRunner.h" 38 #include "bindings/core/v8/V8ScriptRunner.h"
39 #include "bindings/core/v8/V8Window.h" 39 #include "bindings/core/v8/V8Window.h"
40 #include "bindings/core/v8/V8WindowShell.h" 40 #include "bindings/core/v8/WindowProxy.h"
41 #include "core/frame/FrameConsole.h" 41 #include "core/frame/FrameConsole.h"
42 #include "core/frame/FrameHost.h" 42 #include "core/frame/FrameHost.h"
43 #include "core/frame/LocalFrame.h" 43 #include "core/frame/LocalFrame.h"
44 #include "core/frame/UseCounter.h" 44 #include "core/frame/UseCounter.h"
45 #include "core/inspector/InspectorInstrumentation.h" 45 #include "core/inspector/InspectorInstrumentation.h"
46 #include "core/inspector/InspectorTraceEvents.h" 46 #include "core/inspector/InspectorTraceEvents.h"
47 #include "core/inspector/ScriptDebugListener.h" 47 #include "core/inspector/ScriptDebugListener.h"
48 #include "core/page/Page.h" 48 #include "core/page/Page.h"
49 #include "wtf/OwnPtr.h" 49 #include "wtf/OwnPtr.h"
50 #include "wtf/PassOwnPtr.h" 50 #include "wtf/PassOwnPtr.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 ensureDebuggerScriptCompiled(); 119 ensureDebuggerScriptCompiled();
120 } 120 }
121 121
122 v8::Local<v8::Context> debuggerContext = v8::Debug::GetDebugContext(); 122 v8::Local<v8::Context> debuggerContext = v8::Debug::GetDebugContext();
123 v8::Context::Scope contextScope(debuggerContext); 123 v8::Context::Scope contextScope(debuggerContext);
124 124
125 v8::Local<v8::Object> debuggerScript = m_debuggerScript.newLocal(m_isolate); 125 v8::Local<v8::Object> debuggerScript = m_debuggerScript.newLocal(m_isolate);
126 ASSERT(!debuggerScript->IsUndefined()); 126 ASSERT(!debuggerScript->IsUndefined());
127 m_listenersMap.set(page, listener); 127 m_listenersMap.set(page, listener);
128 128
129 V8WindowShell* shell = scriptController.existingWindowShell(DOMWrapperWorld: :mainWorld()); 129 WindowProxy* shell = scriptController.existingWindowShell(DOMWrapperWorld::m ainWorld());
jochen (gone - plz use gerrit) 2014/08/11 14:27:31 WindowProxy* existingWindowShell() looks odd. We s
haraken 2014/08/12 01:09:57 Done.
130 if (!shell || !shell->isContextInitialized()) 130 if (!shell || !shell->isContextInitialized())
131 return; 131 return;
132 v8::Local<v8::Context> context = shell->context(); 132 v8::Local<v8::Context> context = shell->context();
133 v8::Handle<v8::Function> getScriptsFunction = v8::Local<v8::Function>::Cast( debuggerScript->Get(v8AtomicString(m_isolate, "getScripts"))); 133 v8::Handle<v8::Function> getScriptsFunction = v8::Local<v8::Function>::Cast( debuggerScript->Get(v8AtomicString(m_isolate, "getScripts")));
134 v8::Handle<v8::Value> argv[] = { context->GetEmbedderData(0) }; 134 v8::Handle<v8::Value> argv[] = { context->GetEmbedderData(0) };
135 v8::Handle<v8::Value> value = V8ScriptRunner::callInternalFunction(getScript sFunction, debuggerScript, WTF_ARRAY_LENGTH(argv), argv, m_isolate); 135 v8::Handle<v8::Value> value = V8ScriptRunner::callInternalFunction(getScript sFunction, debuggerScript, WTF_ARRAY_LENGTH(argv), argv, m_isolate);
136 if (value.IsEmpty()) 136 if (value.IsEmpty())
137 return; 137 return;
138 ASSERT(!value->IsUndefined() && value->IsArray()); 138 ASSERT(!value->IsUndefined() && value->IsArray());
139 v8::Handle<v8::Array> scriptsArray = v8::Handle<v8::Array>::Cast(value); 139 v8::Handle<v8::Array> scriptsArray = v8::Handle<v8::Array>::Cast(value);
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 UseCounter::muteForInspector(); 314 UseCounter::muteForInspector();
315 } 315 }
316 316
317 void PageScriptDebugServer::unmuteWarningsAndDeprecations() 317 void PageScriptDebugServer::unmuteWarningsAndDeprecations()
318 { 318 {
319 FrameConsole::unmute(); 319 FrameConsole::unmute();
320 UseCounter::unmuteForInspector(); 320 UseCounter::unmuteForInspector();
321 } 321 }
322 322
323 } // namespace blink 323 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698