diff options
Diffstat (limited to 'WebCore/bindings/js/ScriptValue.cpp')
-rw-r--r-- | WebCore/bindings/js/ScriptValue.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/WebCore/bindings/js/ScriptValue.cpp b/WebCore/bindings/js/ScriptValue.cpp index 6eac102..5444e0e 100644 --- a/WebCore/bindings/js/ScriptValue.cpp +++ b/WebCore/bindings/js/ScriptValue.cpp @@ -32,6 +32,8 @@ #include <JavaScriptCore/APICast.h> #include <JavaScriptCore/JSValueRef.h> +#include "JSInspectedObjectWrapper.h" + #include <runtime/JSLock.h> #include <runtime/Protect.h> #include <runtime/UString.h> @@ -40,13 +42,21 @@ using namespace JSC; namespace WebCore { -bool ScriptValue::getString(String& result) const +#if ENABLE(INSPECTOR) +ScriptValue ScriptValue::quarantineValue(ScriptState* scriptState, const ScriptValue& value) +{ + JSLock lock(SilenceAssertionsOnly); + return ScriptValue(JSInspectedObjectWrapper::wrap(scriptState, value.jsValue())); +} +#endif + +bool ScriptValue::getString(ScriptState* scriptState, String& result) const { if (!m_value) return false; JSLock lock(SilenceAssertionsOnly); UString ustring; - if (!m_value.get().getString(ustring)) + if (!m_value.get().getString(scriptState, ustring)) return false; result = ustring; return true; |