Bug 1254906 - Change JSPrincipals::dump annotation to match that of JSPrincipals::dump draft
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 10 Mar 2016 14:04:11 +0900
changeset 338926 8d730c25a9b3d1067a5e11391ec2df05e4bc3e80
parent 338925 a959b172be4ce33c2de022e84902d222876d847d
child 338927 69c08e9ba5cccbe16c8ff04a47ac460a306f8779
push id12607
push userbmo:mh+mozilla@glandium.org
push dateThu, 10 Mar 2016 05:10:04 +0000
bugs1254906
milestone48.0a1
Bug 1254906 - Change JSPrincipals::dump annotation to match that of JSPrincipals::dump The current discrepancy works because gecko and js don't actually agree on the meaning of JS_EXPORT_API and JS_PUBLIC_API, but moving the configure flags that incluences their meaning is going to make them agree, and that adds a fatal warning when building nsJSPrincipals.cpp because of the discrepancy.
caps/nsJSPrincipals.cpp
--- a/caps/nsJSPrincipals.cpp
+++ b/caps/nsJSPrincipals.cpp
@@ -78,17 +78,17 @@ nsJSPrincipals::Destroy(JSPrincipals *js
     nsjsprin->refcount++;
 #endif
     nsjsprin->Release();
 }
 
 #ifdef DEBUG
 
 // Defined here so one can do principals->dump() in the debugger
-JS_EXPORT_API(void)
+JS_PUBLIC_API(void)
 JSPrincipals::dump()
 {
     if (debugToken == nsJSPrincipals::DEBUG_TOKEN) {
       nsAutoCString str;
       static_cast<nsJSPrincipals *>(this)->GetScriptLocation(str);
       fprintf(stderr, "nsIPrincipal (%p) = %s\n", static_cast<void*>(this), str.get());
     } else if (debugToken == dom::workers::kJSPrincipalsDebugToken) {
         fprintf(stderr, "Web Worker principal singleton (%p)\n", this);