WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
184981
window.postMessage() / focus() / blur() throw a TypeError when called on a RemoteDOMWindow
https://bugs.webkit.org/show_bug.cgi?id=184981
Summary
window.postMessage() / focus() / blur() throw a TypeError when called on a Re...
Chris Dumez
Reported
2018-04-25 10:52:55 PDT
window.postMessage() / focus() / blur() throw a TypeError when called on a RemoteDOMWindow, complaining that |this| is not a Window.
Attachments
Patch
(8.67 KB, patch)
2018-04-25 10:57 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2018-04-25 10:57:58 PDT
Created
attachment 338757
[details]
Patch
Sam Weinig
Comment 2
2018-04-25 17:29:00 PDT
Comment on
attachment 338757
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=338757&action=review
> Source/WebCore/bindings/js/JSDOMWindowCustom.cpp:111 > - slot.setCustom(thisObject, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum), windowType == DOMWindowType::Remote ? nonCachingStaticFunctionGetter<jsDOMWindowInstanceFunctionClose, 0> : nonCachingStaticFunctionGetter<jsDOMWindowInstanceFunctionClose, 0>); > + slot.setCustom(thisObject, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum), windowType == DOMWindowType::Remote ? nonCachingStaticFunctionGetter<jsRemoteDOMWindowInstanceFunctionClose, 0> : nonCachingStaticFunctionGetter<jsDOMWindowInstanceFunctionClose, 0>); > return true; > } > if (propertyName == builtinNames.focusPublicName()) { > - slot.setCustom(thisObject, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum), windowType == DOMWindowType::Remote ? nonCachingStaticFunctionGetter<jsDOMWindowInstanceFunctionFocus, 0> : nonCachingStaticFunctionGetter<jsDOMWindowInstanceFunctionFocus, 0>); > + slot.setCustom(thisObject, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum), windowType == DOMWindowType::Remote ? nonCachingStaticFunctionGetter<jsRemoteDOMWindowInstanceFunctionFocus, 0> : nonCachingStaticFunctionGetter<jsDOMWindowInstanceFunctionFocus, 0>); > return true; > } > if (propertyName == builtinNames.postMessagePublicName()) { > - slot.setCustom(thisObject, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum), windowType == DOMWindowType::Remote ? nonCachingStaticFunctionGetter<jsDOMWindowInstanceFunctionPostMessage, 0> : nonCachingStaticFunctionGetter<jsDOMWindowInstanceFunctionPostMessage, 2>); > + slot.setCustom(thisObject, static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum), windowType == DOMWindowType::Remote ? nonCachingStaticFunctionGetter<jsRemoteDOMWindowInstanceFunctionPostMessage, 0> : nonCachingStaticFunctionGetter<jsDOMWindowInstanceFunctionPostMessage, 2>);
It really bums me out that JSRemoteDOMWindow is referenced in this JSDOMWindow specific file. I think we should think about moving this to a more neutral location at some point.
WebKit Commit Bot
Comment 3
2018-04-25 17:55:54 PDT
Comment on
attachment 338757
[details]
Patch Clearing flags on attachment: 338757 Committed
r231037
: <
https://trac.webkit.org/changeset/231037
>
WebKit Commit Bot
Comment 4
2018-04-25 17:55:56 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 5
2018-04-25 17:56:20 PDT
<
rdar://problem/39742647
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug