Closed
Bug 1007644
Opened 12 years ago
Closed 12 years ago
Build process stops with gcc 4.9 while processing nsWindowWatcher.cpp
Categories
(Core :: Security: CAPS, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: fredbezies, Unassigned)
Details
Attachments
(1 file)
|
16.37 KB,
text/x-chdr
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0 (Beta/Release)
Build ID: 20140508030203
Steps to reproduce:
I tried to build Mozilla Firefox trunk code with gcc 4.9, but it stops while processing nsWindowWatcher.cpp.
Actual results:
Building process crashes. Related to bugfix for 997987 ?
Here is the crash log :
66:53.02 Unified_cpp_windowwatcher_src0.o
66:56.24 In file included from /home/fred/logs/fox/objdir-fx/embedding/components/windowwatcher/src/Unified_cpp_windowwatcher_src0.cpp:28:0:
66:56.24 /home/fred/logs/fox/src/embedding/components/windowwatcher/src/nsWindowWatcher.cpp: In member function ‘nsresult nsWindowWatcher::OpenWindowInternal(nsIDOMWindow*, const char*, const char*, const char*, bool, bool, bool, nsIArray*, nsIDOMWindow**)’:
66:56.24 /home/fred/logs/fox/src/embedding/components/windowwatcher/src/nsWindowWatcher.cpp:794:54: error: ‘class nsIScriptSecurityManager’ has no member named ‘GetSubjectPrincipal’
66:56.24 if (NS_FAILED(sm->GetSubjectPrincipal(getter_AddRefs(subjectPrincipal)))) {
66:56.24 ^
66:56.25 In the directory /home/fred/logs/fox/objdir-fx/embedding/components/windowwatcher/src
66:56.25 The following command failed to execute properly:
66:56.25 /usr/bin/ccache c++ -o Unified_cpp_windowwatcher_src0.o -c -I../../../../dist/stl_wrappers -I../../../../dist/system_wrappers -include /home/fred/logs/fox/src/config/gcc_hidden.h -DMOZ_GLUE_IN_PROGRAM -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -DNO_NSPR_10_SUPPORT -I/home/fred/logs/fox/src/embedding/components/windowwatcher/src -I. -I/home/fred/logs/fox/src/dom/base -I../../../../dist/include -I/home/fred/logs/fox/objdir-fx/dist/include/nspr -I/home/fred/logs/fox/objdir-fx/dist/include/nss -I/home/fred/logs/fox/objdir-fx/dist/include -I/home/fred/logs/fox/src/modules/zlib/src -fPIC -DMOZILLA_CLIENT -include ../../../../mozilla-config.h -MD -MP -MF .deps/Unified_cpp_windowwatcher_src0.o.pp -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Werror=int-to-pointer-cast -Wtype-limits -Wempty-body -Wsign-compare -Wno-invalid-offsetof -Wcast-align -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe -DNDEBUG -DTRIMMED -g -Os -freorder-blocks -fomit-frame-pointer /home/fred/logs/fox/objdir-fx/embedding/components/windowwatcher/src/Unified_cpp_windowwatcher_src0.cpp
66:56.25 /home/fred/logs/fox/src/config/rules.mk:1001: recipe for target 'Unified_cpp_windowwatcher_src0.o' failed
66:56.25 make[5]: *** [Unified_cpp_windowwatcher_src0.o] Error 1
66:56.25 /home/fred/logs/fox/src/config/recurse.mk:95: recipe for target 'embedding/components/windowwatcher/src/compile' failed
66:56.25 make[4]: *** [embedding/components/windowwatcher/src/compile] Error 2
66:56.26 make[4]: *** Attente des tâches non terminées....
67:02.73 /home/fred/logs/fox/src/config/recurse.mk:39: recipe for target 'compile' failed
67:02.73 make[3]: *** [compile] Error 2
67:02.73 /home/fred/logs/fox/src/config/rules.mk:592: recipe for target 'default' failed
67:02.73 make[2]: *** [default] Error 2
67:02.73 /home/fred/logs/fox/src/client.mk:398: recipe for target 'realbuild' failed
67:02.73 make[1]: *** [realbuild] Error 2
67:02.73 client.mk:185: recipe for target 'build' failed
67:02.73 make: *** [build] Error 2
67:02.86 0 compiler warnings present.
Expected results:
Build process going on ?
| Reporter | ||
Updated•12 years ago
|
Component: Untriaged → Security: CAPS
Product: Firefox → Core
| Reporter | ||
Comment 1•12 years ago
|
||
I made a link with bug 997987 because of nsWindowWatcher.cpp history stored on lxr.mozilla.org.
Comment 2•12 years ago
|
||
> error: ‘class nsIScriptSecurityManager’ has no member named ‘GetSubjectPrincipal’
Can you attach your generated nsIScriptSecurityManager.h file?
| Reporter | ||
Comment 3•12 years ago
|
||
Comment 4•12 years ago
|
||
Er I see. This is after bug 997987.
But what's line 794 in your nsWindowWatcher.cpp? On tip it's:
794 nsContentUtils::GetCurrentJSContext() ? nsContentUtils::GetSubjectPrincipal()
| Reporter | ||
Comment 5•12 years ago
|
||
if (NS_FAILED(sm->GetSubjectPrincipal(getter_AddRefs(subjectPrincipal)))) {
subjectPrincipal = nullptr;
If I do a hg --verbose pull -u, I got this :
[fred@fredo-arch src]$ hg --verbose pull -u
pulling from https://hg.mozilla.org/mozilla-central/
searching for changes
all local heads known remotely
adding changesets
adding manifests
adding file changes
added 24 changesets with 110 changes to 25 files
resolving manifests
getting b2g/chrome/content/settings.js
getting b2g/config/emulator-ics/sources.xml
getting b2g/config/emulator-jb/sources.xml
getting b2g/config/emulator-kk/sources.xml
getting b2g/config/emulator/sources.xml
getting b2g/config/flame/sources.xml
getting b2g/config/gaia.json
getting b2g/config/hamachi/sources.xml
getting b2g/config/helix/sources.xml
getting b2g/config/inari/sources.xml
getting b2g/config/leo/sources.xml
getting b2g/config/mako/sources.xml
getting b2g/config/wasabi/sources.xml
getting dom/apps/src/AppsUtils.jsm
getting dom/contacts/fallback/ContactDB.jsm
getting dom/contacts/fallback/ContactService.jsm
getting dom/ipc/TabChild.cpp
getting dom/mobilemessage/src/gonk/MobileMessageDB.jsm
getting dom/phonenumberutils/PhoneNumber.jsm
getting dom/phonenumberutils/PhoneNumberUtils.jsm
getting dom/system/gonk/Nfc.js
getting dom/system/gonk/NfcContentHelper.js
getting dom/system/gonk/RILContentHelper.js
getting dom/system/gonk/RadioInterfaceLayer.js
getting dom/telephony/gonk/TelephonyProvider.js
25 files updated, 0 files merged, 0 files removed, 0 files unresolved
Comment 6•12 years ago
|
||
>if (NS_FAILED(sm->GetSubjectPrincipal(getter_AddRefs(subjectPrincipal)))) {
That's definitely before bug 997987.
What does hg parent say for your tree right now? What about "hg diff embedding/components/windowwatcher/src/nsWindowWatcher.cpp caps/idl/nsIScriptSecurityManager.idl"?
| Reporter | ||
Comment 7•12 years ago
|
||
1) [fred@fredo-arch src]$ hg parent
changeset: 182123:a8602e656d86
tag: tip
parent: 182099:81ec0ae4df9c
parent: 182122:a5a66da35c5f
user: Carsten "Tomcat" Book <cbook@mozilla.com>
date: Thu May 08 14:02:20 2014 +0200
summary: merge b2g-inbound to mozilla-central
2) [fred@fredo-arch src]$ hg diff embedding/components/windowwatcher/src/nsWindowWatcher.cpp caps/idl/nsIScriptSecurityManager.idl
diff -r a8602e656d86 embedding/components/windowwatcher/src/nsWindowWatcher.cpp
--- a/embedding/components/windowwatcher/src/nsWindowWatcher.cpp Thu May 08 14:02:20 2014 +0200
+++ b/embedding/components/windowwatcher/src/nsWindowWatcher.cpp Thu May 08 19:00:25 2014 +0200
@@ -785,14 +785,15 @@
// Now we have to set the right opener principal on the new window. Note
// that we have to do this _before_ starting any URI loads, thanks to the
- // sync nature of javascript: loads.
- //
- // Note: The check for the current JSContext isn't necessarily sensical.
- // It's just designed to preserve old semantics during a mass-conversion
- // patch.
- nsCOMPtr<nsIPrincipal> subjectPrincipal =
- nsContentUtils::GetCurrentJSContext() ? nsContentUtils::GetSubjectPrincipal()
- : nullptr;
+ // sync nature of javascript: loads. Since this is the only place where we
+ // set said opener principal, we need to do it for all URIs, including
+ // chrome ones. So to deal with the mess that is bug 79775, just press on in
+ // a reasonable way even if GetSubjectPrincipal fails. In that case, just
+ // use a null subjectPrincipal.
+ nsCOMPtr<nsIPrincipal> subjectPrincipal;
+ if (NS_FAILED(sm->GetSubjectPrincipal(getter_AddRefs(subjectPrincipal)))) {
+ subjectPrincipal = nullptr;
+ }
if (windowIsNew) {
// Now set the opener principal on the new window. Note that we need to do
Is my copy of trunk code busted ?
Comment 8•12 years ago
|
||
Yes. For some reason you have the patches from bug 997987 partially backed out locally.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
| Reporter | ||
Comment 9•12 years ago
|
||
Ok. Grabbing a new copy of trunk code. Sorry for bugspam !
You need to log in
before you can comment on or make changes to this bug.
Description
•