Closed Bug 1489147 Opened Last year Closed Last year

Remove the XPCOM component registration for nsXPConnect

Categories

(Core :: XPConnect, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: ehsan, Assigned: ehsan)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

No description provided.
We move the XPConnect() singleton accessor to nsIXConnect to make it available for consumers outside of XPConnect.  Most of the consumers of the singleton accessor just need the nsIXPConnect public interface, except for the IsShuttingDown() member which this patch adds to nsIXPConnect as well.
Duplicate of this bug: 1477830
This looks like it is partially a dupe of bug 1477830, which I reviewed but somehow never landed.
Duplicate of this bug: 1414439
I also started on a similar patch in bug 1489147, but I never finished it.
(In reply to Andrew McCreight [:mccr8] from comment #5)
> I also started on a similar patch in bug 1489147, but I never finished it.

I meant bug 1414439, of course.
Whoops, sorry to duplicate work...
Comment on attachment 9006919 [details]
Bug 1489147 - Remove the XPCOM component registration for nsXPConnect; r=mccr8

Andrew McCreight [:mccr8] has approved the revision.
Attachment #9006919 - Flags: review+
(In reply to :Ehsan Akhgari from comment #7)
> Whoops, sorry to duplicate work...

That's fine. Nathan and I had clearly both lost track of our patches.
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d4ae1994c20c
Remove the XPCOM component registration for nsXPConnect; r=mccr8
It looks like you didn't address my review comments. Was that intentional?
Flags: needinfo?(ehsan)
^^

Taken from the failure log: 

[task 2018-09-06T19:07:16.364Z] 19:07:16     INFO -  /builds/worker/workspace/build/src/sccache2/sccache /builds/worker/workspace/build/src/clang/bin/clang++ -o JSDebugger.o -c -flto=thin -I/builds/worker/workspace/build/src/obj-firefox/dist/stl_wrappers -I/builds/worker/workspace/build/src/obj-firefox/dist/system_wrappers -include /builds/worker/workspace/build/src/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/builds/worker/workspace/build/src/js/ductwork/debugger -I/builds/worker/workspace/build/src/obj-firefox/js/ductwork/debugger -I/builds/worker/workspace/build/src/obj-firefox/dist/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/build/src/obj-firefox/mozilla-config.h -Qunused-arguments -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Qunused-arguments -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -Wno-return-type-c-linkage -D_GLIBCXX_USE_CXX11_ABI=0 -fno-sized-deallocation -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -Xclang -load -Xclang /builds/worker/workspace/build/src/obj-firefox/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O2 -fno-omit-frame-pointer -Werror  -MD -MP -MF .deps/JSDebugger.o.pp   /builds/worker/workspace/build/src/js/ductwork/debugger/JSDebugger.cpp
[task 2018-09-06T19:07:16.369Z] 19:07:16     INFO -  /builds/worker/workspace/build/src/js/ductwork/debugger/JSDebugger.cpp:40:3: error: Unused "kungFuDeathGrip" 'nsCOMPtr<nsIXPConnect>' objects constructed from temporary values are prohibited
[task 2018-09-06T19:07:16.369Z] 19:07:16     INFO -    nsCOMPtr<nsIXPConnect> xpc = nsIXPConnect::XPConnect();
[task 2018-09-06T19:07:16.369Z] 19:07:16     INFO -    ^
[task 2018-09-06T19:07:16.369Z] 19:07:16     INFO -  /builds/worker/workspace/build/src/js/ductwork/debugger/JSDebugger.cpp:40:32: note: Please switch all accesses to this value to go through 'xpc', or explicitly pass 'xpc' to `mozilla::Unused`
[task 2018-09-06T19:07:16.369Z] 19:07:16     INFO -    nsCOMPtr<nsIXPConnect> xpc = nsIXPConnect::XPConnect();
[task 2018-09-06T19:07:16.369Z] 19:07:16     INFO -                                 ^
[task 2018-09-06T19:07:16.369Z] 19:07:16     INFO -  1 error generated.
[task 2018-09-06T19:07:16.369Z] 19:07:16     INFO -  /builds/worker/workspace/build/src/config/rules.mk:1110: recipe for target 'JSDebugger.o' failed
[task 2018-09-06T19:07:16.370Z] 19:07:16     INFO -  make[4]: *** [JSDebugger.o] Error 1
[task 2018-09-06T19:07:16.370Z] 19:07:16     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/js/ductwork/debugger'
[task 2018-09-06T19:07:16.370Z] 19:07:16     INFO -  /builds/worker/workspace/build/src/config/recurse.mk:74: recipe for target 'js/ductwork/debugger/target' failed
[task 2018-09-06T19:07:16.370Z] 19:07:16     INFO -  make[3]: *** [js/ductwork/debugger/target] Error 2
[task 2018-09-06T19:07:16.370Z] 19:07:16     INFO -  make[3]: *** Waiting for unfinished jobs....
Backout by shindli@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8be67ab3d7d3
Backed out changeset d4ae1994c20c for bustages in JSDebugger.cpp on a CLOSED TREE
That failure was one of my review comments. ;)
(In reply to Andrew McCreight [:mccr8] from comment #11)
> It looks like you didn't address my review comments. Was that intentional?

No sorry, I didn't see them.  Not exactly sure why that happened, completely my fault.  :-(  I think I'm not as used to Phabricator as I thought I was yet.
Flags: needinfo?(ehsan)
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/38ed8871759e
Remove the XPCOM component registration for nsXPConnect; r=mccr8
https://hg.mozilla.org/mozilla-central/rev/38ed8871759e
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.