Backed out changeset 1442613953ba (bug 784400) for mochitest-2 and xpcshell test bustage

This commit is contained in:
Steve Fink 2012-08-31 09:19:53 -07:00
parent acfce6497a
commit cfd0834b7c
5 changed files with 1 additions and 25 deletions

View File

@ -5023,13 +5023,6 @@ JS_DefineFunctions(JSContext *cx, JSObject *objArg, JSFunctionSpec *fs)
fun->setExtendedSlot(0, PrivateValue(fs));
}
/*
* During creation of the self-hosting global, we ignore all
* self-hosted functions.
*/
if (fs->selfHostedName && cx->runtime->isSelfHostedGlobal(cx->global()))
return JS_TRUE;
fun = js_DefineFunction(cx, obj, id, fs->call.op, fs->nargs, flags, fs->selfHostedName);
if (!fun)
return JS_FALSE;

View File

@ -259,12 +259,6 @@ JSRuntime::initSelfHosting(JSContext *cx)
return false;
JS_SetGlobalObject(cx, selfHostedGlobal_);
AutoCompartment ac(cx, cx->global());
RootedObject shg(cx, selfHostedGlobal_);
if (!JS_InitStandardClasses(cx, shg))
return false;
const char *src = selfhosted::raw_sources;
uint32_t srcLen = selfhosted::GetRawScriptsSize();
@ -272,6 +266,7 @@ JSRuntime::initSelfHosting(JSContext *cx)
options.setFileAndLine("self-hosted", 1);
options.setSelfHostingMode(true);
RootedObject shg(cx, selfHostedGlobal_);
Value rv;
/*
* Set a temporary error reporter printing to stderr because it is too

View File

@ -441,9 +441,6 @@ struct JSRuntime : js::RuntimeFriendFields
bool initSelfHosting(JSContext *cx);
void markSelfHostedGlobal(JSTracer *trc);
bool isSelfHostedGlobal(js::HandleObject global) {
return global == selfHostedGlobal_;
}
JSFunction *getSelfHostedFunction(JSContext *cx, const char *name);
bool cloneSelfHostedValueById(JSContext *cx, jsid id, js::HandleObject holder, js::Value *vp);

View File

@ -1514,7 +1514,6 @@ js_DefineFunction(JSContext *cx, HandleObject obj, HandleId id, Native native,
kind);
} else {
JS_ASSERT(attrs & JSFUN_INTERPRETED);
JS_ASSERT(!cx->runtime->isSelfHostedGlobal(cx->global()));
fun = cx->runtime->getSelfHostedFunction(cx, selfHostedName);
fun->initAtom(JSID_TO_ATOM(id));
}

View File

@ -454,14 +454,6 @@ GlobalObject::initFunctionAndObjectClasses(JSContext *cx)
self->setIntrinsicsHolder(intrinsicsHolder);
if (!JS_DefineFunctions(cx, intrinsicsHolder, intrinsic_functions))
return NULL;
/* Define a property 'global' with the current global as its value. */
RootedValue global(cx, OBJECT_TO_JSVAL(self));
if (!JSObject::defineProperty(cx, intrinsicsHolder, cx->runtime->atomState.globalAtom,
global, JS_PropertyStub, JS_StrictPropertyStub,
JSPROP_PERMANENT | JSPROP_READONLY))
{
return NULL;
}
/*
* The global object should have |Object.prototype| as its [[Prototype]].