JS - Object - "TypeError: setting a property that has only a getter" without mentioning file and property name

This commit is contained in:
janekptacijarabaci 2017-08-24 10:34:22 +02:00 • committed by Roy Tam
commit 5149d56104
6 changed files with 2 additions and 32 deletions

View file

@ -968,11 +968,4 @@ IsDebuggerSandbox(JSObject* object)
SimpleGlobalObject::GlobalType::WorkerDebuggerSandbox;
}
bool
GetterOnlyJSNative(JSContext* aCx, unsigned aArgc, JS::Value* aVp)
{
JS_ReportErrorNumberASCII(aCx, js::GetErrorMessage, nullptr, JSMSG_GETTER_ONLY);
return false;
}
END_WORKERS_NAMESPACE

View file

@ -362,14 +362,6 @@ IsDebuggerGlobal(JSObject* global);
bool
IsDebuggerSandbox(JSObject* object);
// Throws the JSMSG_GETTER_ONLY exception. This shouldn't be used going
// forward -- getter-only properties should just use JS_PSG for the setter
// (implying no setter at all), which will not throw when set in non-strict
// code but will in strict code. Old code should use this only for temporary
// compatibility reasons.
extern bool
GetterOnlyJSNative(JSContext* aCx, unsigned aArgc, JS::Value* aVp);
END_WORKERS_NAMESPACE
#endif // mozilla_dom_workers_workers_h__