Bug 81759 - JSC and V8 have a different type meaning for symbol {}
Summary: JSC and V8 have a different type meaning for symbol {}
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-21 04:15 PDT by Jeremy Mao
Modified: 2012-03-21 10:21 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Mao 2012-03-21 04:15:54 PDT
Take new webkitPeerConnection("NONE", {}) for an example, the second parameter should be a callback function, if we run this test case in V8, it will threw no exception, since it will take {} as an ObjectType. But if we run this test case in JSC, it will threw an TYPE_MISMATCH_ERR, since it takes {} as a NullType. I am not sure which is correct, maybe we can have a discussion here.
Comment 1 Adam Barth 2012-03-21 10:01:52 PDT
{} is JavaScript for an empty object.  An empty object shouldn't be callable, so I'd expect both bindings to throw a type error.  Maybe we need to add a check for whether callbacks are actually callable?