Lines Matching refs:scriptState

47 ScriptObject::ScriptObject(ScriptState* scriptState, JSObject* object)
48 : ScriptValue(scriptState->globalData(), object)
49 , m_scriptState(scriptState)
53 static bool handleException(ScriptState* scriptState)
55 if (!scriptState->hadException())
58 reportException(scriptState, scriptState->exception());
62 bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, const ScriptObject& value)
65 scriptState->lexicalGlobalObject()->putDirect(scriptState->globalData(), Identifier(scriptState, name), value.jsObject());
66 return handleException(scriptState);
70 bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InspectorFrontendHost* value)
73 JSDOMGlobalObject* globalObject = static_cast<JSDOMGlobalObject*>(scriptState->lexicalGlobalObject());
74 globalObject->putDirect(scriptState->globalData(), Identifier(scriptState, name), toJS(scriptState, globalObject, value));
75 return handleException(scriptState);
78 bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InjectedScriptHost* value)
81 JSDOMGlobalObject* globalObject = static_cast<JSDOMGlobalObject*>(scriptState->lexicalGlobalObject());
82 globalObject->putDirect(scriptState->globalData(), Identifier(scriptState, name), toJS(scriptState, globalObject, value));
83 return handleException(scriptState);
87 bool ScriptGlobalObject::get(ScriptState* scriptState, const char* name, ScriptObject& value)
90 JSValue jsValue = scriptState->lexicalGlobalObject()->get(scriptState, Identifier(scriptState, name));
97 value = ScriptObject(scriptState, asObject(jsValue));
101 bool ScriptGlobalObject::remove(ScriptState* scriptState, const char* name)
104 scriptState->lexicalGlobalObject()->deleteProperty(scriptState, Identifier(scriptState, name));
105 return handleException(scriptState);