bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InjectedScriptHost* value) { JSLock lock(SilenceAssertionsOnly); JSDOMGlobalObject* globalObject = static_cast<JSDOMGlobalObject*>(scriptState->lexicalGlobalObject()); globalObject->putDirect(scriptState->globalData(), Identifier(scriptState, name), toJS(scriptState, globalObject, value)); return handleException(scriptState); }
void injectInternalsObject(JSContextRef context) { JSLock lock(SilenceAssertionsOnly); ExecState* exec = toJS(context); JSDOMGlobalObject* globalObject = static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()); globalObject->putDirect(exec->globalData(), Identifier(exec, "internals"), toJS(exec, globalObject, Internals::create())); }
bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InjectedScriptHost* value) { JSLockHolder lock(scriptState); JSDOMGlobalObject* globalObject = jsCast<JSDOMGlobalObject*>(scriptState->lexicalGlobalObject()); globalObject->putDirect(scriptState->vm(), Identifier(scriptState, name), toJS(scriptState, globalObject, value)); return handleException(scriptState); }