Summary: | Provide some way to stop a JavaScript infinite loop | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Joost de Valk (AlthA) <joost> | ||||||||||||
Component: | JavaScriptCore | Assignee: | Anders Carlsson <andersca> | ||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||
Severity: | Critical | CC: | active.23.13, bugzilla, darin, gavin.sharp, jay, krishnamurty.podipireddy | ||||||||||||
Priority: | P1 | Keywords: | InRadar | ||||||||||||
Version: | 420+ | ||||||||||||||
Hardware: | Mac | ||||||||||||||
OS: | OS X 10.4 | ||||||||||||||
Bug Depends on: | |||||||||||||||
Bug Blocks: | 6958, 3552, 6693 | ||||||||||||||
Attachments: |
|
Description
Joost de Valk (AlthA)
2006-02-05 01:16:56 PST
In Radar as <rdar://problem/3895579> *** Bug 6089 has been marked as a duplicate of this bug. *** *** Bug 8949 has been marked as a duplicate of this bug. *** Created attachment 8863 [details]
Hang detection
This implements the JSC part of a hang-detection implementation that works pretty much like the one in Mozilla.
Unfortunately, when turned on this causes a performance regression in ibench. The other approach I tried (using UNIX signals) proved to be complicated and error-prone and it too gave a performance regression (albeit a smaller one)
Off. It's going to be tricky to come up with a way to do this without slowing things down! Comment on attachment 8863 [details]
Hang detection
Clearing the review bit, since this was a perf. regression.
Created attachment 8872 [details]
Much better patch
Here's a new patch that doesn't cause any measurable slowdown at all (Less than 0.2% on ibench)
Comment on attachment 8872 [details]
Much better patch
r=me
ggaren likes it too
Created attachment 8886 [details]
Add WebKit delegate
Comment on attachment 8886 [details]
Add WebKit delegate
SCRIPT_TIMEOUT_TIME_MS should be a C++ const, not a macro.
The shouldInterruptScript functions could be const.
The WebDefaultUIDelegate is a pretty heavyweight way to make shouldInterruptJavaScript default to no. WebFrameBridge should just say return NO -- I don't think we need this method int the WebDefaultUIDelegate.
Created attachment 8902 [details]
Address comments
Created attachment 8903 [details]
Address Geoff's comments
I talked to Geoff on IRC and he had a couple of comments which this patch addresses.
Comment on attachment 8903 [details]
Address Geoff's comments
r=me
and the crowd goes wild
|