Closed
Bug 1572292
Opened 5 years ago
Closed 5 years ago
Rewrite nsIHttpProtocolHandler::EnsureHSTSDataReadyNative() in XPIDL
Categories
(Core :: Networking, enhancement, P2)
Core
Networking
Tracking
()
RESOLVED
FIXED
mozilla70
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: ehsan.akhgari, Assigned: kershaw)
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
I accidentally added a new IDL member after this line https://searchfox.org/mozilla-central/rev/9ae20497229225cb3fa729a787791f424ff8087b/netwerk/protocol/http/nsIHttpProtocolHandler.idl#74 and got crashes when accessing it from JS, because the vtable entrypoint for EnsureHSTSDataReadyNative()
would be accessed instead, as the XPIDL compiler has no idea about this custom virtual function.
You can rewrite this in XPIDL like this:
// at the top of the file
native HSTSDataCallbackWrapperAlreadyAddRefed(already_AddRefed<mozilla::net::HSTSDataCallbackWrapper>);
[noscript]
void EnsureHSTSDataReadyNative(in HSTSDataCallbackWrapperAlreadyAddRefed aCallback);
That should give us the exact same C++ code and prevent this kind of problem from happening again.
What do you think, Kershaw?
Flags: needinfo?(kershaw)
Assignee | ||
Comment 1•5 years ago
|
||
Thanks for filing this bug.
I think your solution is better than what we have now.
Assignee: nobody → kershaw
Flags: needinfo?(kershaw)
Priority: -- → P2
Whiteboard: [necko-triaged]
Assignee | ||
Comment 2•5 years ago
|
||
Pushed by kjang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/028f522d1e6a Rewrite EnsureHSTSDataReadyNative r=Ehsan
Comment 4•5 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox70:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in
before you can comment on or make changes to this bug.
Description
•