Changeset 184258 in webkit


Ignore:
Timestamp:
May 12, 2015, 9:38:39 PM (10 years ago)
Author:
mitz@apple.com
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.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r184241 r184258  
     12015-05-12  Dan Bernstein  <mitz@apple.com>
     2
     3        In Safari, Debug > Get Bytecode Profile crashes the Web Content process
     4        https://bugs.webkit.org/show_bug.cgi?id=144944
     5
     6        Reviewed by Darin Adler.
     7
     8        * WebProcess/WebPage/WebPage.cpp:
     9        (WebKit::WebPage::getBytecodeProfile): Don’t assert that m_perBytecodeProfiler isn’t null,
     10        because it is when the profiler is disabled, which is the default. In that case, return
     11        after sending back the empty string, rather than continuing to dereference a null pointer.
     12
    1132015-05-12  Jon Honeycutt  <jhoneycutt@apple.com>
    214
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r184011 r184258  
    48594859void WebPage::getBytecodeProfile(uint64_t callbackID)
    48604860{
    4861     ASSERT(JSDOMWindow::commonVM().m_perBytecodeProfiler);
    4862     if (!JSDOMWindow::commonVM().m_perBytecodeProfiler)
     4861    if (!JSDOMWindow::commonVM().m_perBytecodeProfiler) {
    48634862        send(Messages::WebPageProxy::StringCallback(String(), callbackID));
     4863        return;
     4864    }
     4865
    48644866    String result = JSDOMWindow::commonVM().m_perBytecodeProfiler->toJSON();
    48654867    ASSERT(result.length());
Note: See TracChangeset for help on using the changeset viewer.