[Webkit-unassigned] [Bug 40012] New: Callable objects created via JavaScriptCore API cannot be used as Geolocation callbacks
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jun 1 11:24:35 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=40012
Summary: Callable objects created via JavaScriptCore API cannot
be used as Geolocation callbacks
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P2
Component: WebCore JavaScript
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: ap at webkit.org
CC: sam at webkit.org, barraclough at apple.com
Geolocation specification requires that only "Function objects" can be used for Geolocation callbacks. We currently require the callback to inherit from JSFunction, which is almost definitely incorrect, because this doesn't include functions created via API.
In JSC, there are two ways to check for being callable:
1) Check callData return value. That's the closest to just trying to call the object, but it includes RegExp objects, which we may or may not want to exclude;
2) Check that className is "Function". That seems to match the current WebIDL text best, but it doesn't cover objects created via API.
The reason for the spec requirement is reportedly to disallow objects with handleEvent property, and that makes sense, because the callbacks aren't events. But Geolocation shouldn't really be different from Database or other APIs that have callbacks. Web APIs don't check for callback argument types upfront (I actually suspect that a JS object can even become callable - or cease to be callable - at some point after creation, making upfront checks inadequate).
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list