Bug 39996 - [Qt] Web inspector crashes when pausing JavaScript execution
Summary: [Qt] Web inspector crashes when pausing JavaScript execution
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P3 Normal
Assignee: Nobody
URL:
Keywords: Qt
Depends on:
Blocks:
 
Reported: 2010-06-01 07:35 PDT by arvid2.nilsson
Modified: 2010-06-15 07:23 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description arvid2.nilsson 2010-06-01 07:35:33 PDT
When using the QtWebKit 2.0 branch from gitorious.

It crashes after exactly 10 seconds. How could that be? Well, the JavaScript interrupt timeout is 10 seconds. The TimeoutChecker attempts to interrupt the paused JavaScript, which causes an ASSERT to fail when Chrome::shouldInterruptJavaScript() creates the PageGroupLoadDeferrer because the DOM objects are already suspended.

Possible fix:
in QWebSettings, when enabling developer extras, turn off the timeoutchecker:

        value = attributes.value(QWebSettings::DeveloperExtrasEnabled,
                                      global->attributes.value(QWebSettings::DeveloperExtrasEnabled));
        // Fix a bug where QtWebKit crashes if you pause JavaScript execution
        // because it tries to interrupt a script that is already paused.
        JSDOMWindowBase::commonJSGlobalData()->timeoutChecker.setTimeoutInterval(value ? 0 : 10000);
        settings->setDeveloperExtrasEnabled(value);
Comment 1 Jędrzej Nowacki 2010-06-15 07:23:05 PDT
We couldn't reproduce it with trunk and with 2.0 branch (linux). Feel free to reopen the bug if it is still valid for you.