Since we don't currently enable the JSC watchdog by default, Web Worker's terminate() function doesn't actually do anything. We should fix this.
Per discussion with Geoff, we can fix this by always enabling the watchdog without a time limit for Web Workers. But before we do that, we should teach the FTL to check the watchdog when present. Since the FTL watchdog support is mostly motivated by the need in Web Workers, I'll tackle the FTL in this bug as well.
Will just implement the FTL support (and improve the DFG support) in this bug. Will add the Worker threads watchdog in 131082 instead where we re-work how Watchdog's m_didFire works.
Created attachment 259302 [details] the fix.
Comment on attachment 259302 [details] the fix. View in context: https://bugs.webkit.org/attachment.cgi?id=259302&action=review r=me > Source/JavaScriptCore/jit/JITOperations.cpp:991 > -void JIT_OPERATION operationHandleWatchdogTimer(ExecState* exec) > +UnusedPtr JIT_OPERATION operationHandleWatchdogTimer(ExecState* exec) Why does this return UnusedPtr?
Comment on attachment 259302 [details] the fix. r=me
Comment on attachment 259302 [details] the fix. View in context: https://bugs.webkit.org/attachment.cgi?id=259302&action=review >> Source/JavaScriptCore/jit/JITOperations.cpp:991 >> +UnusedPtr JIT_OPERATION operationHandleWatchdogTimer(ExecState* exec) > > Why does this return UnusedPtr? As explained in the ChangeLog, "This allows me to reuse the existing DFG slow path generator mechanism. I didn't think that operationHandleWatchdogTimer() was worth introducing a whole new set of machinery just so we can have a slow path that returns void." I'll add a comment here as well to document this.
Thanks for the review. Landed in r188649: <http://trac.webkit.org/r188649>.