diff options
Diffstat (limited to 'js/src/wasm/AsmJS.cpp')
-rw-r--r-- | js/src/wasm/AsmJS.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/js/src/wasm/AsmJS.cpp b/js/src/wasm/AsmJS.cpp index 4dbc9b387..b4f41c3d5 100644 --- a/js/src/wasm/AsmJS.cpp +++ b/js/src/wasm/AsmJS.cpp @@ -679,7 +679,7 @@ FunctionObject(ParseNode* fn) static inline PropertyName* FunctionName(ParseNode* fn) { - if (JSAtom* name = FunctionObject(fn)->name()) + if (JSAtom* name = FunctionObject(fn)->explicitName()) return name->asPropertyName(); return nullptr; } @@ -3249,7 +3249,7 @@ static bool CheckFunctionHead(ModuleValidator& m, ParseNode* fn) { JSFunction* fun = FunctionObject(fn); - if (fun->hasRest()) + if (fn->pn_funbox->hasRest()) return m.fail(fn, "rest args not allowed"); if (fun->isExprBody()) return m.fail(fn, "expression closures not allowed"); @@ -8037,7 +8037,7 @@ TryInstantiate(JSContext* cx, CallArgs args, Module& module, const AsmJSMetadata static bool HandleInstantiationFailure(JSContext* cx, CallArgs args, const AsmJSMetadata& metadata) { - RootedAtom name(cx, args.callee().as<JSFunction>().name()); + RootedAtom name(cx, args.callee().as<JSFunction>().explicitName()); if (cx->isExceptionPending()) return false; @@ -8128,7 +8128,7 @@ InstantiateAsmJS(JSContext* cx, unsigned argc, JS::Value* vp) static JSFunction* NewAsmJSModuleFunction(ExclusiveContext* cx, JSFunction* origFun, HandleObject moduleObj) { - RootedAtom name(cx, origFun->name()); + RootedAtom name(cx, origFun->explicitName()); JSFunction::Flags flags = origFun->isLambda() ? JSFunction::ASMJS_LAMBDA_CTOR : JSFunction::ASMJS_CTOR; @@ -8846,7 +8846,7 @@ js::AsmJSModuleToString(JSContext* cx, HandleFunction fun, bool addParenToLambda if (!out.append("function ")) return nullptr; - if (fun->name() && !out.append(fun->name())) + if (fun->explicitName() && !out.append(fun->explicitName())) return nullptr; bool haveSource = source->hasSourceData(); @@ -8894,8 +8894,8 @@ js::AsmJSFunctionToString(JSContext* cx, HandleFunction fun) if (!haveSource) { // asm.js functions can't be anonymous - MOZ_ASSERT(fun->name()); - if (!out.append(fun->name())) + MOZ_ASSERT(fun->explicitName()); + if (!out.append(fun->explicitName())) return nullptr; if (!out.append("() {\n [sourceless code]\n}")) return nullptr; |