Summary: | testRunner should be able to tell you if a function is DFG compiled | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Filip Pizlo <fpizlo> | ||||||
Component: | New Bugs | Assignee: | Filip Pizlo <fpizlo> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | mhahnenberg | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Filip Pizlo
2013-05-27 17:02:23 PDT
Created attachment 203017 [details]
Patch
Comment on attachment 203017 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=203017&action=review > Source/JavaScriptCore/API/JSCTestRunnerUtils.cpp:52 > + return 0; Is this meant to return the JSValueRef of 0 or a null JSValueRef? I ask because everywhere else we return undefined. (In reply to comment #2) > (From update of attachment 203017 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=203017&action=review > > > Source/JavaScriptCore/API/JSCTestRunnerUtils.cpp:52 > > + return 0; > > Is this meant to return the JSValueRef of 0 or a null JSValueRef? I ask because everywhere else we return undefined. It's meant to return 0. We return undefined if the user didn't pass a function. Here, the user passed a function. If it doesn't have a code block that just means that it hasn't been called yet so by definition it has had zero DFG compiles. (In reply to comment #3) > (In reply to comment #2) > > (From update of attachment 203017 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=203017&action=review > > > > > Source/JavaScriptCore/API/JSCTestRunnerUtils.cpp:52 > > > + return 0; > > > > Is this meant to return the JSValueRef of 0 or a null JSValueRef? I ask because everywhere else we return undefined. > > It's meant to return 0. > > We return undefined if the user didn't pass a function. > > Here, the user passed a function. If it doesn't have a code block that just means that it hasn't been called yet so by definition it has had zero DFG compiles. In that case, don't you need to make a JSValueRef that contains zero instead of returning a null JSValueRef? (In reply to comment #4) > (In reply to comment #3) > > (In reply to comment #2) > > > (From update of attachment 203017 [details] [details] [details]) > > > View in context: https://bugs.webkit.org/attachment.cgi?id=203017&action=review > > > > > > > Source/JavaScriptCore/API/JSCTestRunnerUtils.cpp:52 > > > > + return 0; > > > > > > Is this meant to return the JSValueRef of 0 or a null JSValueRef? I ask because everywhere else we return undefined. > > > > It's meant to return 0. > > > > We return undefined if the user didn't pass a function. > > > > Here, the user passed a function. If it doesn't have a code block that just means that it hasn't been called yet so by definition it has had zero DFG compiles. > > In that case, don't you need to make a JSValueRef that contains zero instead of returning a null JSValueRef? Oh. Good point! Created attachment 203062 [details]
Patch
Comment on attachment 203062 [details]
Patch
r=me
Landed in http://trac.webkit.org/changeset/150807 |