зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1405820 - Remove ReportUsageErrorASCII assertions that are invalid when used with shell clone() function, r=waldo.
This commit is contained in:
Родитель
62eaa517f9
Коммит
731824c92b
|
@ -0,0 +1,5 @@
|
|||
// |jit-test| error: Error
|
||||
|
||||
var g = newGlobal();
|
||||
g.f = setJitCompilerOption;
|
||||
g.eval("clone(f)()(9)")
|
|
@ -491,14 +491,6 @@ js::ReportErrorVA(JSContext* cx, unsigned flags, const char* format,
|
|||
void
|
||||
js::ReportUsageErrorASCII(JSContext* cx, HandleObject callee, const char* msg)
|
||||
{
|
||||
const char* usageStr = "usage";
|
||||
PropertyName* usageAtom = Atomize(cx, usageStr, strlen(usageStr))->asPropertyName();
|
||||
RootedId id(cx, NameToId(usageAtom));
|
||||
DebugOnly<Shape*> shape = static_cast<Shape*>(callee->as<JSFunction>().lookup(cx, id));
|
||||
MOZ_ASSERT(!shape->configurable());
|
||||
MOZ_ASSERT(!shape->writable());
|
||||
MOZ_ASSERT(shape->hasDefaultGetter());
|
||||
|
||||
RootedValue usage(cx);
|
||||
if (!JS_GetProperty(cx, callee, "usage", &usage))
|
||||
return;
|
||||
|
|
Загрузка…
Ссылка в новой задаче