Implement a getter method to WindowGlobalParent/WindowGlobalChild
Categories
(Core :: DOM: Core & HTML, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: jdai, Assigned: jdai)
References
Details
Attachments
(6 files, 3 obsolete files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
This bug will provide a getter method from WindowGlobalParent/WindowGlobalChild. [ChromeOnly] partial interface WindowGlobalParent { // Getter method added to WindowGlobalParent. When called looks up the // corresponding actor, constructs it if it hasn't been constructed yet, // and returns it. [Throws] WindowActorParent getActor(DOMString name); }; [ChromeOnly] partial interface WindowGlobalChild { // Getter method added to WindowGlobalParent. When called looks up the // corresponding actor, constructs it if it hasn't been constructed yet, // and returns it. [Throws] WindowActorChild getActor(DOMString name); };
Assignee | ||
Comment 2•5 years ago
•
|
||
Summarize the current status, the bug needs to do the following things:
- Looks up the corresponding actor.
- Constructed it if it hasn't been constructed yet.
2a. Load module URI.
2b. Construct the actor. - Return the actor.
I'm working on 2b. In 2b, I was trying two different ways to construct an actor. The first way, I want to get constructor from module's export, then call the constructor to create an object instance. However, I can't get constructor from module's export. I guess it's because the module's export only has the class declaration, not the instance of the class, so there is no constructor's function object. The second way, I want to get class from module's export, then create an object instance by the class. However, I use JS_NewObject to create an object instance, the prototype is undefined. If I'm in the wrong direction, please let me know.
Assignee | ||
Comment 3•5 years ago
|
||
Nika pointed out that I missed adding [Constructor] in webidl. That is the main reason that calls the constructor to create an object instance doesn't work[1].
[1] https://heycam.github.io/webidl/#Constructor
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=f4f787d9a250126e893e8c28d04333bb91de4142
Assignee | ||
Comment 4•5 years ago
|
||
Assignee | ||
Comment 5•5 years ago
|
||
GetWindowGlobalChild[1] should be exposed to webidl so that the test case can get an actor from the child side. Retrieve the review request, I will update the patches and send a review again.
[1] https://searchfox.org/mozilla-central/source/dom/base/nsPIDOMWindow.h#367
Assignee | ||
Comment 6•5 years ago
|
||
Assignee | ||
Comment 7•5 years ago
|
||
Depends on D16844
Assignee | ||
Comment 8•5 years ago
|
||
Depends on D16845
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 9•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Comment 10•5 years ago
|
||
Pushed by jdai@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/48b36980fe1c Part 1: Expose window global child to window. r=nika https://hg.mozilla.org/integration/autoland/rev/0333640041bb Part 2: Implement a getter method to WindowGlobalParent/WindowGlobalChild. r=nika https://hg.mozilla.org/integration/autoland/rev/a480d92de046 Part 3: Add getActor test for WindowGlobalParent/WindowGlobalChild. r=nika
Comment 11•5 years ago
|
||
Backed out 3 changesets (bug 1513878) for build bustage. CLOSED TREE
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=224075898&repo=autoland&lineNumber=18711
Backout:
https://hg.mozilla.org/integration/autoland/rev/883b89f3a11f1416611a52cf015bcf4291739a6a
Assignee | ||
Comment 12•5 years ago
|
||
It's only happened at Android 4.2 x86 debug, and errors show at
/builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/dom/PaymentMethodChangeEvent.h:32:43: error: unknown type name 'ChangeDetails'
/builds/worker/workspace/build/src/obj-firefox/dom/bindings/PaymentMethodChangeEventBinding.cpp:279:15: error: cannot initialize object parameter of type 'const mozilla::dom::Event' with an expression of type 'mozilla::dom::PaymentMethodChangeEvent'
/builds/worker/workspace/build/src/obj-firefox/dom/bindings/PaymentMethodChangeEventBinding.cpp:587:14: error: static_cast from 'mozilla::dom::PaymentMethodChangeEvent *' to 'mozilla::dom::PaymentRequestUpdateEvent *', which are not related by inheritance, is not allowed
/builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/dom/BindingUtils.h:2424:14: error: no matching member function for call to 'PreserveWrapper'
/builds/worker/workspace/build/src/obj-firefox/dist/include/nsISupportsUtils.h:121:3: error: static_assert failed "don't use CallQueryInterface for compile-time-determinable casts"
/builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/dom/BindingUtils.h:982:19: error: cannot initialize object parameter of type 'const nsWrapperCache' with an expression of type 'mozilla::dom::PaymentMethodChangeEvent'
/builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/dom/BindingUtils.h:1608:37: error: cannot initialize object parameter of type 'mozilla::dom::Event' with an expression of type 'mozilla::dom::PaymentMethodChangeEvent'
/builds/worker/workspace/build/src/obj-firefox/dist/include/nsCycleCollectionNoteChild.h:46:52: error: cannot initialize a parameter of type 'mozilla::dom::Event *' with an lvalue of type 'mozilla::dom::PaymentMethodChangeEvent *'
Assignee | ||
Comment 13•5 years ago
|
||
Assignee | ||
Comment 14•5 years ago
|
||
Depends on D17826
Assignee | ||
Comment 15•5 years ago
|
||
Depends on D17827
Assignee | ||
Comment 16•5 years ago
|
||
Depends on D17828
Updated•5 years ago
|
Assignee | ||
Comment 17•5 years ago
|
||
Updated•5 years ago
|
Comment 18•5 years ago
|
||
Pushed by jdai@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/845c2f0d18b5 Part 1: Expose window global child to window. r=nika https://hg.mozilla.org/integration/autoland/rev/d7289306549f Part 2: Implement a getter method to WindowGlobalParent/WindowGlobalChild. r=nika https://hg.mozilla.org/integration/autoland/rev/640f4072f19a Part 3: Add getActor test for WindowGlobalParent/WindowGlobalChild. r=nika
Assignee | ||
Comment 19•5 years ago
|
||
(In reply to John Dai[:jdai] from comment #12)
The problem is that PaymentMethodChangeEvent.h[1] doesn't include header file for ChangeDetails
.
Comment 20•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/845c2f0d18b5
https://hg.mozilla.org/mozilla-central/rev/d7289306549f
https://hg.mozilla.org/mozilla-central/rev/640f4072f19a
Updated•5 years ago
|
Updated•5 years ago
|
Description
•