Closed Bug 1028745 Opened 6 years ago Closed 6 years ago

--disable-ion --disable-unified-compilation build fails: js/src/jsscript.cpp:2057:29: error: 'ASSERT' was not declared in this scope


(Core :: JavaScript Engine, defect)

Not set



Tracking Status
firefox30 --- unaffected
firefox31 --- unaffected
firefox32 --- fixed
firefox33 --- fixed


(Reporter: jbeich, Assigned: jbeich)




(1 file)

+++ This bug was initially created as a clone of Bug #1025674 +++

There's a namespace pollution that accidentally broke --disable-ion on mozilla-aurora. ASSERT() is reserved for libraries but seems to creep in JS code.

js/src/jsscript.cpp:2057:5: error: use of undeclared identifier
    ASSERT(script != nullptr);
js/src/jsscript.cpp:2058:5: error: use of undeclared identifier
    ASSERT(ssd != nullptr);
2 errors generated.

mozilla-central unified build of --disable-ion picks up ASSERT macro from double-conversion library

In file included from objdir/js/src/Unified_cpp_js_src3.cpp:41:
In file included from js/src/jsnum.cpp:23:
In file included from js/src/../../mfbt/double-conversion/double-conversion.h:32:
js/src/../../mfbt/double-conversion/utils.h:31:2: error: test
#error test
1 error generated.

while --enable-ion and mozilla-beta - from WTF library

In file included from js/src/jsscript.cpp:11:
In file included from js/src/jsscriptinlines.h:13:
In file included from js/src/jit/BaselineJIT.h:14:
In file included from js/src/jscntxt.h:15:
In file included from js/src/vm/Runtime.h:41:
In file included from js/src/vm/Stack.h:16:
In file included from js/src/jit/JitFrameIterator.h:17:
In file included from js/src/jit/Snapshots.h:17:
In file included from js/src/jit/Registers.h:16:
In file included from js/src/jit/x64/Architecture-x64.h:10:
In file included from js/src/assembler/assembler/MacroAssembler.h:54:
In file included from js/src/assembler/assembler/MacroAssemblerX86_64.h:39:
In file included from js/src/assembler/assembler/MacroAssemblerX86Common.h:37:
In file included from js/src/assembler/assembler/X86Assembler.h:39:
In file included from js/src/assembler/assembler/AssemblerBuffer.h:40:
js/src/assembler/wtf/Assertions.h:29:2: error: test
#error test
1 error generated.

In file included from js/src/jsscript.cpp:11:
In file included from js/src/jsscriptinlines.h:15:
In file included from js/src/vm/ScopeObject.h:12:
In file included from js/src/jsweakmap.h:10:
In file included from js/src/jscompartment.h:14:
In file included from js/src/vm/GlobalObject.h:16:
In file included from js/src/builtin/RegExp.h:10:
In file included from js/src/vm/RegExpObject.h:22:
In file included from js/src/yarr/YarrInterpreter.h:31:
In file included from js/src/yarr/YarrPattern.h:32:
In file included from js/src/yarr/wtfbridge.h:22:
In file included from js/src/yarr/CheckedArithmetic.h:31:
js/src/assembler/wtf/Assertions.h:29:2: error: test
#error test
1 error generated.

Found out after injecting a dup into working build e.g.,

js/src/jsscript.cpp:56:9: warning: 'ASSERT' macro redefined
#define ASSERT(x)
js/src/assembler/wtf/Assertions.h:41:9: note: previous definition is
#define ASSERT(assertion) MOZ_ASSERT(assertion)
1 warning generated.
Blocks: 976446
After bisecting the first bad is bug 976446, not sure why.
Attachment #8444172 - Flags: review?(bhackett1024)
Attachment #8444172 - Flags: review?(bhackett1024) → review+
Comment on attachment 8444172 [details] [diff] [review]
rename to JS_ASSERT

Probably NPOTB like bug 1025674 and bug 1028775.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): none, bug 976446 only exposed it
User impact if declined: --disable-ion broken on release branches since 32.0
Testing completed (on m-c, etc.): m-i now
Risk to taking this patch (and alternatives if risky): Low, broken build at most.
String or IDL/UUID changes made by this patch: None
Attachment #8444172 - Flags: approval-mozilla-aurora?
Assignee: nobody → jbeich
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Comment on attachment 8444172 [details] [diff] [review]
rename to JS_ASSERT

Aurora approval granted.
Attachment #8444172 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.