Closed Bug 1272938 Opened 8 years ago Closed 8 years ago

compile error in testThreadingThread

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: stevensn, Assigned: stevensn)

References

Details

Attachments

(1 file, 1 obsolete file)

Building on my  non-ion platform gives the following error

js/src/jsapi-tests/testThreadingThread.cpp:43:28: error: \u2018ThisThread\u2019 has not been declared
 0:52.20      js::Thread thread([](){ThisThread::SetName("JSAPI Test Thread");});

among other places where the js:: namespace isn't explicitly referenced in this file
Attached patch Add explicit using namespace js (obsolete) — Splinter Review
Assignee: nobody → steve
Status: NEW → ASSIGNED
Attachment #8752538 - Flags: review?(terrence)
Comment on attachment 8752538 [details] [diff] [review]
Add explicit using namespace js

Review of attachment 8752538 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/jsapi-tests/testThreadingThread.cpp
@@ +11,5 @@
>  #include "mozilla/Vector.h"
>  #include "jsapi-tests/tests.h"
>  #include "threading/Thread.h"
>  
> +using namespace js;

The reason this broke in the first place is that this file got unified in my build with a file with this declaration, but not in yours. We should just add the js:: to the relevant declarations instead.
Attachment #8752538 - Flags: review?(terrence)
Oh, note that you can test for similar bustage easily by setting FILES_PER_UNIFIED_FILE=1 in the moz.build (current value 6). We intermittently clean up this build configuration, but it's not something that happens continuously.
Attachment #8753143 - Flags: review?(terrence)
Attachment #8752538 - Attachment is obsolete: true
Comment on attachment 8753143 [details] [diff] [review]
Add js namespace prefix

Review of attachment 8753143 [details] [diff] [review]:
-----------------------------------------------------------------

That's perfect, thank you for the patch!
Attachment #8753143 - Flags: review?(terrence) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/035efa5e0655
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.