summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/js/ScriptObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/js/ScriptObject.cpp')
-rw-r--r--WebCore/bindings/js/ScriptObject.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/WebCore/bindings/js/ScriptObject.cpp b/WebCore/bindings/js/ScriptObject.cpp
index f14145e..0e62903 100644
--- a/WebCore/bindings/js/ScriptObject.cpp
+++ b/WebCore/bindings/js/ScriptObject.cpp
@@ -36,7 +36,15 @@
#include <runtime/JSLock.h>
#if ENABLE(INSPECTOR)
+<<<<<<< HEAD:WebCore/bindings/js/ScriptObject.cpp
+=======
+#include "JSInjectedScriptHost.h"
+>>>>>>> webkit.org at r51976:WebCore/bindings/js/ScriptObject.cpp
#include "JSInspectorBackend.h"
+<<<<<<< HEAD:WebCore/bindings/js/ScriptObject.cpp
+=======
+#include "JSInspectorFrontendHost.h"
+>>>>>>> webkit.org at r51976:WebCore/bindings/js/ScriptObject.cpp
#endif
using namespace JSC;
@@ -90,6 +98,14 @@ bool ScriptObject::set(const char* name, double value)
return handleException(m_scriptState);
}
+bool ScriptObject::set(const char* name, long value)
+{
+ JSLock lock(SilenceAssertionsOnly);
+ PutPropertySlot slot;
+ jsObject()->put(m_scriptState, Identifier(m_scriptState, name), jsNumber(m_scriptState, value), slot);
+ return handleException(m_scriptState);
+}
+
bool ScriptObject::set(const char* name, long long value)
{
JSLock lock(SilenceAssertionsOnly);
@@ -114,6 +130,14 @@ bool ScriptObject::set(const char* name, unsigned value)
return handleException(m_scriptState);
}
+bool ScriptObject::set(const char* name, unsigned long value)
+{
+ JSLock lock(SilenceAssertionsOnly);
+ PutPropertySlot slot;
+ jsObject()->put(m_scriptState, Identifier(m_scriptState, name), jsNumber(m_scriptState, value), slot);
+ return handleException(m_scriptState);
+}
+
bool ScriptObject::set(const char* name, bool value)
{
JSLock lock(SilenceAssertionsOnly);
@@ -143,6 +167,22 @@ bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, Inspect
globalObject->putDirect(Identifier(scriptState, name), toJS(scriptState, globalObject, value));
return handleException(scriptState);
}
+
+bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InspectorFrontendHost* value)
+{
+ JSLock lock(SilenceAssertionsOnly);
+ JSDOMGlobalObject* globalObject = static_cast<JSDOMGlobalObject*>(scriptState->lexicalGlobalObject());
+ globalObject->putDirect(Identifier(scriptState, name), toJS(scriptState, globalObject, value));
+ return handleException(scriptState);
+}
+
+bool ScriptGlobalObject::set(ScriptState* scriptState, const char* name, InjectedScriptHost* value)
+{
+ JSLock lock(SilenceAssertionsOnly);
+ JSDOMGlobalObject* globalObject = static_cast<JSDOMGlobalObject*>(scriptState->lexicalGlobalObject());
+ globalObject->putDirect(Identifier(scriptState, name), toJS(scriptState, globalObject, value));
+ return handleException(scriptState);
+}
#endif // ENABLE(INSPECTOR)
bool ScriptGlobalObject::get(ScriptState* scriptState, const char* name, ScriptObject& value)