Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(375)

Unified Diff: Source/bindings/v8/ScriptValue.cpp

Issue 24139004: Add toWebCoreString() / toWebCoreAtomicString() overloads taking a v8::String (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix bad if condition Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/v8/ScriptPreprocessor.cpp ('k') | Source/bindings/v8/V8Binding.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/ScriptValue.cpp
diff --git a/Source/bindings/v8/ScriptValue.cpp b/Source/bindings/v8/ScriptValue.cpp
index b342697e1a64862b83b6e02b902417371b0f60f0..d9fb33806a89d95989d74f6831fd5b76b2025707 100644
--- a/Source/bindings/v8/ScriptValue.cpp
+++ b/Source/bindings/v8/ScriptValue.cpp
@@ -71,7 +71,7 @@ bool ScriptValue::getString(String& result, v8::Isolate* isolate) const
v8::Handle<v8::Value> string = v8Value();
if (string.IsEmpty() || !string->IsString())
return false;
- result = toWebCoreString(string);
+ result = toWebCoreString(string.As<v8::String>());
return true;
}
@@ -102,7 +102,7 @@ static PassRefPtr<JSONValue> v8ToJSONValue(v8::Handle<v8::Value> value, int maxD
if (value->IsNumber())
return JSONBasicValue::create(value->NumberValue());
if (value->IsString())
- return JSONString::create(toWebCoreString(value));
+ return JSONString::create(toWebCoreString(value.As<v8::String>()));
if (value->IsArray()) {
v8::Handle<v8::Array> array = v8::Handle<v8::Array>::Cast(value);
RefPtr<JSONArray> inspectorArray = JSONArray::create();
« no previous file with comments | « Source/bindings/v8/ScriptPreprocessor.cpp ('k') | Source/bindings/v8/V8Binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698