Title: [184258] trunk/Source/WebKit2
Revision
184258
Author
[email protected]
Date
2015-05-12 21:38:39 -0700 (Tue, 12 May 2015)

Log Message

In Safari, Debug > Get Bytecode Profile crashes the Web Content process
https://bugs.webkit.org/show_bug.cgi?id=144944

Reviewed by Darin Adler.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::getBytecodeProfile): Don’t assert that m_perBytecodeProfiler isn’t null,
because it is when the profiler is disabled, which is the default. In that case, return
after sending back the empty string, rather than continuing to dereference a null pointer.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (184257 => 184258)


--- trunk/Source/WebKit2/ChangeLog	2015-05-13 04:25:46 UTC (rev 184257)
+++ trunk/Source/WebKit2/ChangeLog	2015-05-13 04:38:39 UTC (rev 184258)
@@ -1,3 +1,15 @@
+2015-05-12  Dan Bernstein  <[email protected]>
+
+        In Safari, Debug > Get Bytecode Profile crashes the Web Content process
+        https://bugs.webkit.org/show_bug.cgi?id=144944
+
+        Reviewed by Darin Adler.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::getBytecodeProfile): Don’t assert that m_perBytecodeProfiler isn’t null,
+        because it is when the profiler is disabled, which is the default. In that case, return
+        after sending back the empty string, rather than continuing to dereference a null pointer.
+
 2015-05-12  Jon Honeycutt  <[email protected]>
 
         Crash when using <input type=file>

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (184257 => 184258)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2015-05-13 04:25:46 UTC (rev 184257)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2015-05-13 04:38:39 UTC (rev 184258)
@@ -4858,9 +4858,11 @@
 
 void WebPage::getBytecodeProfile(uint64_t callbackID)
 {
-    ASSERT(JSDOMWindow::commonVM().m_perBytecodeProfiler);
-    if (!JSDOMWindow::commonVM().m_perBytecodeProfiler)
+    if (!JSDOMWindow::commonVM().m_perBytecodeProfiler) {
         send(Messages::WebPageProxy::StringCallback(String(), callbackID));
+        return;
+    }
+
     String result = JSDOMWindow::commonVM().m_perBytecodeProfiler->toJSON();
     ASSERT(result.length());
     send(Messages::WebPageProxy::StringCallback(result, callbackID));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to