Bug 1036778 - Replace MOZ_ASSUME_UNREACHABLE with MOZ_CRASH in js/xpconnect. r=bholley
authorChris Peterson <cpeterson@mozilla.com>
Sun, 29 Jun 2014 20:42:36 -0700
changeset 193533 b4e66f3f59f82a7237c7cf34386fc58244051c60
parent 193532 121c4677c64b0f7e041fec928d9a2833472c03c3
child 193534 805ac89b59240d1cec3116591cba55d51f0aaa7e
push id27123
push userryanvm@gmail.com
push dateFri, 11 Jul 2014 20:35:05 +0000
treeherdermozilla-central@84bd8d9f4256 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs1036778
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1036778 - Replace MOZ_ASSUME_UNREACHABLE with MOZ_CRASH in js/xpconnect. r=bholley
js/xpconnect/src/XPCJSRuntime.cpp
js/xpconnect/wrappers/XrayWrapper.cpp
--- a/js/xpconnect/src/XPCJSRuntime.cpp
+++ b/js/xpconnect/src/XPCJSRuntime.cpp
@@ -371,17 +371,18 @@ bool CompartmentPrivate::TryParseLocatio
         if (TryParseLocationURICandidate(Substring(chain, idx + arrowLength),
                                          aLocationHint, aURI))
             return true;
 
         // Current chain item couldn't be parsed.
         // Strip current item and continue.
         chain = Substring(chain, 0, idx);
     }
-    MOZ_ASSUME_UNREACHABLE("Chain parser loop does not terminate");
+
+    MOZ_CRASH("Chain parser loop does not terminate");
 }
 
 static bool
 PrincipalImmuneToScriptPolicy(nsIPrincipal* aPrincipal)
 {
     // System principal gets a free pass.
     if (nsXPConnect::SecurityManager()->IsSystemPrincipal(aPrincipal))
         return true;
--- a/js/xpconnect/wrappers/XrayWrapper.cpp
+++ b/js/xpconnect/wrappers/XrayWrapper.cpp
@@ -335,17 +335,17 @@ public:
         HasPrototype = 1
     };
     static const XrayType Type = XrayForJSObject;
 
     virtual bool resolveNativeProperty(JSContext *cx, HandleObject wrapper,
                                        HandleObject holder, HandleId id,
                                        MutableHandle<JSPropertyDescriptor> desc) MOZ_OVERRIDE
     {
-        MOZ_ASSUME_UNREACHABLE("resolveNativeProperty hook should never be called with HasPrototype = 1");
+        MOZ_CRASH("resolveNativeProperty hook should never be called with HasPrototype = 1");
     }
 
     virtual bool resolveOwnProperty(JSContext *cx, const Wrapper &jsWrapper, HandleObject wrapper,
                                     HandleObject holder, HandleId id,
                                     MutableHandle<JSPropertyDescriptor> desc) MOZ_OVERRIDE;
 
     bool delete_(JSContext *cx, HandleObject wrapper, HandleId id, bool *bp);