From c43c8f17629f2dde26f91d69f241fa7bd2165dab Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Thu, 24 Aug 2017 10:34:22 +0200 Subject: JS - Object - "TypeError: setting a property that has only a getter" without mentioning file and property name --- dom/workers/WorkerScope.cpp | 7 ------- dom/workers/Workers.h | 8 -------- 2 files changed, 15 deletions(-) (limited to 'dom') diff --git a/dom/workers/WorkerScope.cpp b/dom/workers/WorkerScope.cpp index d9a987b62..54252e53b 100644 --- a/dom/workers/WorkerScope.cpp +++ b/dom/workers/WorkerScope.cpp @@ -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 diff --git a/dom/workers/Workers.h b/dom/workers/Workers.h index ad083d3b8..cd15a4d7c 100644 --- a/dom/workers/Workers.h +++ b/dom/workers/Workers.h @@ -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__ -- cgit v1.2.3