RESOLVED FIXED 146585
Promise-returning functions should reject promises if the callee is not of the expected type
https://bugs.webkit.org/show_bug.cgi?id=146585
Summary Promise-returning functions should reject promises if the callee is not of th...
youenn fablet
Reported 2015-07-03 04:44:04 PDT
As part of https://bugs.webkit.org/show_bug.cgi?id=146060, most exceptions are caught to reject promise in case of promise-returning functions. Promise should also be rejected if the callee is not of the expected JS wrapper class name.
Attachments
Patch (14.11 KB, patch)
2015-07-03 04:56 PDT, youenn fablet
no flags
Patch for landing (14.18 KB, patch)
2015-07-06 00:12 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2015-07-03 04:56:08 PDT
Darin Adler
Comment 2 2015-07-04 09:38:02 PDT
Comment on attachment 256092 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=256092&action=review > Source/WebCore/bindings/js/JSDOMPromise.h:63 > + JSDOMGlobalObject* globalObject = JSC::jsCast<JSDOMGlobalObject*>(state.lexicalGlobalObject()); Should be a reference. It can’t be null. > Source/WebCore/bindings/js/JSDOMPromise.h:64 > + JSC::JSPromiseDeferred* promiseDeferred = JSC::JSPromiseDeferred::create(&state, globalObject); Should be a reference. It can’t be null.
youenn fablet
Comment 3 2015-07-05 23:39:55 PDT
Comment on attachment 256092 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=256092&action=review >> Source/WebCore/bindings/js/JSDOMPromise.h:63 >> + JSDOMGlobalObject* globalObject = JSC::jsCast<JSDOMGlobalObject*>(state.lexicalGlobalObject()); > > Should be a reference. It can’t be null. ok >> Source/WebCore/bindings/js/JSDOMPromise.h:64 >> + JSC::JSPromiseDeferred* promiseDeferred = JSC::JSPromiseDeferred::create(&state, globalObject); > > Should be a reference. It can’t be null. ok
youenn fablet
Comment 4 2015-07-06 00:12:14 PDT
Created attachment 256197 [details] Patch for landing
WebKit Commit Bot
Comment 5 2015-07-06 01:11:29 PDT
Comment on attachment 256197 [details] Patch for landing Clearing flags on attachment: 256197 Committed r186312: <http://trac.webkit.org/changeset/186312>
WebKit Commit Bot
Comment 6 2015-07-06 01:11:33 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.