mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 992958 - More stylistics fixups. r=me
This commit is contained in:
parent
4d4f8d000c
commit
08d88251c4
@ -614,11 +614,11 @@ CreateFunctionConstructor(JSContext *cx, JSProtoKey key)
|
||||
self, SingletonObject));
|
||||
if (!ctor)
|
||||
return nullptr;
|
||||
RootedAtom functionAtom(cx, cx->names().Function);
|
||||
RootedObject functionCtor(cx, NewFunction(cx, ctor, Function, 1, JSFunction::NATIVE_CTOR, self,
|
||||
functionAtom));
|
||||
HandlePropertyName(cx->names().Function)));
|
||||
if (!functionCtor)
|
||||
return nullptr;
|
||||
|
||||
JS_ASSERT(ctor == functionCtor);
|
||||
return functionCtor;
|
||||
|
||||
@ -633,6 +633,7 @@ CreateFunctionPrototype(JSContext *cx, JSProtoKey key)
|
||||
objectProto, self, SingletonObject);
|
||||
if (!functionProto_)
|
||||
return nullptr;
|
||||
|
||||
RootedFunction functionProto(cx, &functionProto_->as<JSFunction>());
|
||||
|
||||
/*
|
||||
@ -644,6 +645,7 @@ CreateFunctionPrototype(JSContext *cx, JSProtoKey key)
|
||||
self, js::NullPtr());
|
||||
if (!proto)
|
||||
return nullptr;
|
||||
|
||||
JS_ASSERT(proto == functionProto);
|
||||
functionProto->setIsFunctionPrototype();
|
||||
}
|
||||
@ -653,6 +655,7 @@ CreateFunctionPrototype(JSContext *cx, JSProtoKey key)
|
||||
jschar *source = InflateString(cx, rawSource, &sourceLen);
|
||||
if (!source)
|
||||
return nullptr;
|
||||
|
||||
ScriptSource *ss =
|
||||
cx->new_<ScriptSource>();
|
||||
if (!ss) {
|
||||
@ -683,6 +686,7 @@ CreateFunctionPrototype(JSContext *cx, JSProtoKey key)
|
||||
types::TypeObject* protoType = functionProto->getType(cx);
|
||||
if (!protoType)
|
||||
return nullptr;
|
||||
|
||||
protoType->interpretedFunction = functionProto;
|
||||
script->setFunction(functionProto);
|
||||
|
||||
|
@ -78,6 +78,7 @@ CreateObjectConstructor(JSContext *cx, JSProtoKey key)
|
||||
Rooted<GlobalObject*> self(cx, cx->global());
|
||||
if (!GlobalObject::ensureConstructor(cx, self, JSProto_Function))
|
||||
return nullptr;
|
||||
|
||||
RootedObject functionProto(cx, &self->getPrototype(JSProto_Function).toObject());
|
||||
|
||||
/* Create the Object function now that we have a [[Prototype]] for it. */
|
||||
@ -85,9 +86,8 @@ CreateObjectConstructor(JSContext *cx, JSProtoKey key)
|
||||
self, SingletonObject));
|
||||
if (!ctor)
|
||||
return nullptr;
|
||||
RootedAtom objectAtom(cx, cx->names().Object);
|
||||
return NewFunction(cx, ctor, obj_construct, 1, JSFunction::NATIVE_CTOR, self,
|
||||
objectAtom);
|
||||
HandlePropertyName(cx->names().Object));
|
||||
}
|
||||
|
||||
static JSObject *
|
||||
|
Loading…
Reference in New Issue
Block a user