Diff
Modified: trunk/LayoutTests/ChangeLog (139415 => 139416)
--- trunk/LayoutTests/ChangeLog 2013-01-11 08:42:42 UTC (rev 139415)
+++ trunk/LayoutTests/ChangeLog 2013-01-11 09:45:03 UTC (rev 139416)
@@ -1,3 +1,15 @@
+2013-01-11 Pavel Feldman <pfeld...@chromium.org>
+
+ Web Inspector [chromium]: Debugger.globalObjectCleared is not dispatched on reload after renderer swap
+ https://bugs.webkit.org/show_bug.cgi?id=106555
+
+ Reviewed by Vsevolod Vlasov.
+
+ * http/tests/inspector/debugger-test.js:
+ (initialize_DebuggerTest):
+ * inspector/debugger/debugger-scripts-reload-expected.txt: Added.
+ * inspector/debugger/debugger-scripts-reload.html: Added.
+
2013-01-11 Vsevolod Vlasov <vse...@chromium.org>
Web Inspector: Refactoring, move NetworkWorkspaceProvider to NetworkUISourceCodeProvider.js and rename its parent to SimpleWorkspaceProvider.
Modified: trunk/LayoutTests/http/tests/inspector/debugger-test.js (139415 => 139416)
--- trunk/LayoutTests/http/tests/inspector/debugger-test.js 2013-01-11 08:42:42 UTC (rev 139415)
+++ trunk/LayoutTests/http/tests/inspector/debugger-test.js 2013-01-11 09:45:03 UTC (rev 139416)
@@ -284,7 +284,7 @@
var scripts = [];
for (var scriptId in WebInspector.debuggerModel._scripts) {
var script = WebInspector.debuggerModel._scripts[scriptId];
- if (filter(script))
+ if (!filter || filter(script))
scripts.push(script);
}
return scripts;
Added: trunk/LayoutTests/inspector/debugger/debugger-scripts-reload-expected.txt (0 => 139416)
--- trunk/LayoutTests/inspector/debugger/debugger-scripts-reload-expected.txt (rev 0)
+++ trunk/LayoutTests/inspector/debugger/debugger-scripts-reload-expected.txt 2013-01-11 09:45:03 UTC (rev 139416)
@@ -0,0 +1,7 @@
+Tests that scripts list is cleared upon page reload.
+
+Debugger was enabled.
+Dummy script found: dummyScript.js
+Page reloaded.
+Debugger was disabled.
+
Property changes on: trunk/LayoutTests/inspector/debugger/debugger-scripts-reload-expected.txt
___________________________________________________________________
Added: svn:eol-style
Added: trunk/LayoutTests/inspector/debugger/debugger-scripts-reload.html (0 => 139416)
--- trunk/LayoutTests/inspector/debugger/debugger-scripts-reload.html (rev 0)
+++ trunk/LayoutTests/inspector/debugger/debugger-scripts-reload.html 2013-01-11 09:45:03 UTC (rev 139416)
@@ -0,0 +1,51 @@
+<html>
+<head>
+<script src=""
+<script src=""
+
+<script>
+
+function test()
+{
+ InspectorTest.evaluateInPage("function foo() {} //@ sourceURL=dummyScript.js", step1);
+
+ function step1()
+ {
+ InspectorTest.startDebuggerTest(step2);
+ }
+
+ function step2()
+ {
+ InspectorTest.queryScripts(function(script) { step3({ data: script }) });
+ WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.ParsedScriptSource, step3);
+ }
+
+ function step3(event)
+ {
+ var script = event.data;
+ if (script.sourceURL.indexOf("dummyScript.js") !== -1) {
+ InspectorTest.addResult("Dummy script found: " + script.sourceURL);
+ // Let scripts dispatch and reload.
+ setTimeout(InspectorTest.reloadPage.bind(InspectorTest, afterReload), 0);
+ }
+ }
+
+ function afterReload()
+ {
+ var scripts = InspectorTest.queryScripts();
+ for (var i = 0; i < scripts.length; ++i) {
+ if (scripts[i].sourceURL.indexOf("dummyScript.js") !== -1)
+ InspectorTest.addResult("FAILED: dummy script found after navigation");
+ }
+ InspectorTest.completeDebuggerTest();
+ }
+
+}
+</script>
+</head>
+<body _onload_="runTest()">
+<p>
+Tests that scripts list is cleared upon page reload.
+</p>
+</body>
+</html>
Property changes on: trunk/LayoutTests/inspector/debugger/debugger-scripts-reload.html
___________________________________________________________________
Added: svn:eol-style
Modified: trunk/Source/WebCore/ChangeLog (139415 => 139416)
--- trunk/Source/WebCore/ChangeLog 2013-01-11 08:42:42 UTC (rev 139415)
+++ trunk/Source/WebCore/ChangeLog 2013-01-11 09:45:03 UTC (rev 139416)
@@ -1,3 +1,22 @@
+2013-01-11 Pavel Feldman <pfeld...@chromium.org>
+
+ Web Inspector [chromium]: Debugger.globalObjectCleared is not dispatched on reload after renderer swap
+ https://bugs.webkit.org/show_bug.cgi?id=106555
+
+ Reviewed by Vsevolod Vlasov.
+
+ Wrong ::enable was made virtual in the InspectorDebuggerAgent.
+
+ Test: inspector/debugger/debugger-scripts-reload.html
+
+ * inspector/InspectorDebuggerAgent.h:
+ (InspectorDebuggerAgent):
+ * inspector/PageDebuggerAgent.cpp:
+ (WebCore::PageDebuggerAgent::enable):
+ (WebCore::PageDebuggerAgent::disable):
+ * inspector/PageDebuggerAgent.h:
+ (PageDebuggerAgent):
+
2013-01-11 Vsevolod Vlasov <vse...@chromium.org>
Web Inspector: Refactoring, move NetworkWorkspaceProvider to NetworkUISourceCodeProvider.js and rename its parent to SimpleWorkspaceProvider.
Modified: trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h (139415 => 139416)
--- trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h 2013-01-11 08:42:42 UTC (rev 139415)
+++ trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h 2013-01-11 09:45:03 UTC (rev 139416)
@@ -71,9 +71,6 @@
virtual void canSetScriptSource(ErrorString*, bool*);
virtual void supportsSeparateScriptCompilationAndExecution(ErrorString*, bool*);
- virtual void enable(ErrorString*);
- virtual void disable(ErrorString*);
-
virtual void setFrontend(InspectorFrontend*);
virtual void clearFrontend();
virtual void restore();
@@ -83,6 +80,8 @@
void addMessageToConsole(MessageSource, MessageType);
// Part of the protocol.
+ virtual void enable(ErrorString*);
+ virtual void disable(ErrorString*);
virtual void setBreakpointsActive(ErrorString*, bool active);
virtual void setBreakpointByUrl(ErrorString*, int lineNumber, const String* optionalURL, const String* optionalURLRegex, const int* optionalColumnNumber, const String* optionalCondition, TypeBuilder::Debugger::BreakpointId*, RefPtr<TypeBuilder::Array<TypeBuilder::Debugger::Location> >& locations);
@@ -144,13 +143,13 @@
InjectedScriptManager* injectedScriptManager() { return m_injectedScriptManager; }
virtual InjectedScript injectedScriptForEval(ErrorString*, const int* executionContextId) = 0;
+ virtual void enable();
virtual void disable();
virtual void didPause(ScriptState*, const ScriptValue& callFrames, const ScriptValue& exception);
virtual void didContinue();
void reset();
private:
- void enable();
bool enabled();
PassRefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame> > currentCallFrames();
Modified: trunk/Source/WebCore/inspector/PageDebuggerAgent.cpp (139415 => 139416)
--- trunk/Source/WebCore/inspector/PageDebuggerAgent.cpp 2013-01-11 08:42:42 UTC (rev 139415)
+++ trunk/Source/WebCore/inspector/PageDebuggerAgent.cpp 2013-01-11 09:45:03 UTC (rev 139416)
@@ -59,15 +59,15 @@
{
}
-void PageDebuggerAgent::enable(ErrorString* errorString)
+void PageDebuggerAgent::enable()
{
- InspectorDebuggerAgent::enable(errorString);
+ InspectorDebuggerAgent::enable();
m_instrumentingAgents->setPageDebuggerAgent(this);
}
-void PageDebuggerAgent::disable(ErrorString* errorString)
+void PageDebuggerAgent::disable()
{
- InspectorDebuggerAgent::disable(errorString);
+ InspectorDebuggerAgent::disable();
m_instrumentingAgents->setPageDebuggerAgent(0);
}
Modified: trunk/Source/WebCore/inspector/PageDebuggerAgent.h (139415 => 139416)
--- trunk/Source/WebCore/inspector/PageDebuggerAgent.h 2013-01-11 08:42:42 UTC (rev 139415)
+++ trunk/Source/WebCore/inspector/PageDebuggerAgent.h 2013-01-11 09:45:03 UTC (rev 139416)
@@ -49,11 +49,12 @@
static PassOwnPtr<PageDebuggerAgent> create(InstrumentingAgents*, InspectorCompositeState*, InspectorPageAgent*, InjectedScriptManager*, InspectorOverlay*);
virtual ~PageDebuggerAgent();
- virtual void enable(ErrorString*);
- virtual void disable(ErrorString*);
-
void didClearMainFrameWindowObject();
+protected:
+ virtual void enable();
+ virtual void disable();
+
private:
virtual void startListeningScriptDebugServer();
virtual void stopListeningScriptDebugServer();