Title: [91956] trunk/Source/WebCore
- Revision
- 91956
- Author
- [email protected]
- Date
- 2011-07-28 16:37:46 -0700 (Thu, 28 Jul 2011)
Log Message
Web Inspector: [REGRESSION] Inspected tab crashes if navigated with inspector open and there are watch expressions added.
https://bugs.webkit.org/show_bug.cgi?id=65322
Reviewed by Pavel Feldman.
* inspector/InspectorController.cpp:
* inspector/InspectorRuntimeAgent.cpp:
(WebCore::InspectorRuntimeAgent::evaluate):
* inspector/InspectorRuntimeAgent.h:
* inspector/WorkerInspectorController.cpp:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (91955 => 91956)
--- trunk/Source/WebCore/ChangeLog 2011-07-28 23:33:38 UTC (rev 91955)
+++ trunk/Source/WebCore/ChangeLog 2011-07-28 23:37:46 UTC (rev 91956)
@@ -1,3 +1,16 @@
+2011-07-28 Vsevolod Vlasov <[email protected]>
+
+ Web Inspector: [REGRESSION] Inspected tab crashes if navigated with inspector open and there are watch expressions added.
+ https://bugs.webkit.org/show_bug.cgi?id=65322
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/InspectorController.cpp:
+ * inspector/InspectorRuntimeAgent.cpp:
+ (WebCore::InspectorRuntimeAgent::evaluate):
+ * inspector/InspectorRuntimeAgent.h:
+ * inspector/WorkerInspectorController.cpp:
+
2011-07-28 Mihnea Ovidenie <[email protected]>
[CSSRegions]Add basic RenderRegion support
Modified: trunk/Source/WebCore/inspector/InspectorController.cpp (91955 => 91956)
--- trunk/Source/WebCore/inspector/InspectorController.cpp 2011-07-28 23:33:38 UTC (rev 91955)
+++ trunk/Source/WebCore/inspector/InspectorController.cpp 2011-07-28 23:37:46 UTC (rev 91956)
@@ -79,13 +79,11 @@
virtual ~PageRuntimeAgent() { }
private:
- virtual ScriptState* scriptStateForFrameId(ErrorString* errorString, const String& frameId)
+ virtual ScriptState* scriptStateForFrameId(const String& frameId)
{
Frame* frame = m_pageAgent->frameForId(frameId);
- if (!frame) {
- *errorString = "Frame not found";
+ if (!frame)
return 0;
- }
return mainWorldScriptState(frame);
}
virtual ScriptState* getDefaultInspectedState() { return mainWorldScriptState(m_inspectedPage->mainFrame()); }
Modified: trunk/Source/WebCore/inspector/InspectorRuntimeAgent.cpp (91955 => 91956)
--- trunk/Source/WebCore/inspector/InspectorRuntimeAgent.cpp 2011-07-28 23:33:38 UTC (rev 91955)
+++ trunk/Source/WebCore/inspector/InspectorRuntimeAgent.cpp 2011-07-28 23:37:46 UTC (rev 91956)
@@ -60,9 +60,13 @@
void InspectorRuntimeAgent::evaluate(ErrorString* errorString, const String& _expression_, const String* const objectGroup, const bool* const includeCommandLineAPI, const bool* const doNotPauseOnExceptions, const String* const frameId, RefPtr<InspectorObject>* result, bool* wasThrown)
{
ScriptState* scriptState = 0;
- if (frameId)
- scriptState = scriptStateForFrameId(errorString, *frameId);
- else
+ if (frameId) {
+ scriptState = scriptStateForFrameId(*frameId);
+ if (!scriptState) {
+ *errorString = "Frame with given id not found.";
+ return;
+ }
+ } else
scriptState = getDefaultInspectedState();
InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(scriptState);
if (injectedScript.hasNoValue()) {
Modified: trunk/Source/WebCore/inspector/InspectorRuntimeAgent.h (91955 => 91956)
--- trunk/Source/WebCore/inspector/InspectorRuntimeAgent.h 2011-07-28 23:33:38 UTC (rev 91955)
+++ trunk/Source/WebCore/inspector/InspectorRuntimeAgent.h 2011-07-28 23:37:46 UTC (rev 91956)
@@ -65,7 +65,7 @@
protected:
explicit InspectorRuntimeAgent(InjectedScriptManager*);
- virtual ScriptState* scriptStateForFrameId(ErrorString*, const String& frameId) = 0;
+ virtual ScriptState* scriptStateForFrameId(const String& frameId) = 0;
virtual ScriptState* getDefaultInspectedState() = 0;
private:
Modified: trunk/Source/WebCore/inspector/WorkerInspectorController.cpp (91955 => 91956)
--- trunk/Source/WebCore/inspector/WorkerInspectorController.cpp 2011-07-28 23:33:38 UTC (rev 91955)
+++ trunk/Source/WebCore/inspector/WorkerInspectorController.cpp 2011-07-28 23:37:46 UTC (rev 91956)
@@ -61,7 +61,7 @@
virtual ~WorkerRuntimeAgent() { }
private:
- virtual ScriptState* scriptStateForFrameId(ErrorString*, const String&)
+ virtual ScriptState* scriptStateForFrameId(const String&)
{
return 0;
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes