Bug 928736 - Remove forward declarations of classes subsequently defined with attributes, because clang doesn't like it when you do this, and add JS:: to the few places that now need it. r=benjamin

--HG--
extra : amend_source : 103b55a665c89b2cc1fddf100b9ec91a8f34efd6
This commit is contained in:
Jeff Walden 2013-10-24 17:35:36 +01:00
parent 297d558e56
commit 2c8342cfe8
2 changed files with 6 additions and 12 deletions

View File

@ -38,9 +38,6 @@ template <typename T> class AutoVectorRooter;
template<typename K, typename V> class AutoHashMapRooter;
template<typename T> class AutoHashSetRooter;
class ContextOptions;
class AutoSaveContextOptions;
}
// Do the importing.
@ -115,9 +112,6 @@ using JS::MutableHandleValue;
using JS::Zone;
using JS::ContextOptions;
using JS::AutoSaveContextOptions;
} /* namespace js */
#endif /* NamespaceImports_h */

View File

@ -423,7 +423,7 @@ RunFile(JSContext *cx, Handle<JSObject*> obj, const char *filename, FILE *file,
RootedScript script(cx);
{
AutoSaveContextOptions asco(cx);
JS::AutoSaveContextOptions asco(cx);
JS::ContextOptionsRef(cx).setCompileAndGo(true)
.setNoScriptRval(true);
@ -690,7 +690,7 @@ Options(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
ContextOptions oldOptions = JS::ContextOptionsRef(cx);
JS::ContextOptions oldOptions = JS::ContextOptionsRef(cx);
for (unsigned i = 0; i < args.length(); i++) {
JSString *str = JS_ValueToString(cx, args[i]);
if (!str)
@ -1063,7 +1063,7 @@ Evaluate(JSContext *cx, unsigned argc, jsval *vp)
RootedScript script(cx);
{
AutoSaveContextOptions asco(cx);
JS::AutoSaveContextOptions asco(cx);
JS::ContextOptionsRef(cx).setCompileAndGo(compileAndGo)
.setNoScriptRval(noScriptRval);
@ -1226,7 +1226,7 @@ Run(JSContext *cx, unsigned argc, jsval *vp)
RootedScript script(cx);
int64_t startClock = PRMJ_Now();
{
AutoSaveContextOptions asco(cx);
JS::AutoSaveContextOptions asco(cx);
JS::ContextOptionsRef(cx).setCompileAndGo(true)
.setNoScriptRval(true);
@ -2064,7 +2064,7 @@ DisassFile(JSContext *cx, unsigned argc, jsval *vp)
RootedScript script(cx);
{
AutoSaveContextOptions asco(cx);
JS::AutoSaveContextOptions asco(cx);
JS::ContextOptionsRef(cx).setCompileAndGo(true)
.setNoScriptRval(true);
@ -3183,7 +3183,7 @@ Compile(JSContext *cx, unsigned argc, jsval *vp)
RootedObject global(cx, JS::CurrentGlobalOrNull(cx));
JSString *scriptContents = JSVAL_TO_STRING(arg0);
AutoSaveContextOptions asco(cx);
JS::AutoSaveContextOptions asco(cx);
JS::ContextOptionsRef(cx).setCompileAndGo(true)
.setNoScriptRval(true);
bool ok = JS_CompileUCScript(cx, global, JS_GetStringCharsZ(cx, scriptContents),