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

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

Issue 23578025: Remove useless calls to v8::Value::ToString() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/ScriptDebugServer.cpp ('k') | Source/bindings/v8/custom/V8WindowCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8NPUtils.cpp
diff --git a/Source/bindings/v8/V8NPUtils.cpp b/Source/bindings/v8/V8NPUtils.cpp
index eb2e1a5cc800951a4e2bb2cf4697ef2c8d301536..01a740f4e4bb40b74d873b479fb29d07f33c30f2 100644
--- a/Source/bindings/v8/V8NPUtils.cpp
+++ b/Source/bindings/v8/V8NPUtils.cpp
@@ -61,7 +61,7 @@ void convertV8ObjectToNPVariant(v8::Local<v8::Value> object, NPObject* owner, NP
else if (object->IsUndefined())
VOID_TO_NPVARIANT(*result);
else if (object->IsString()) {
- v8::Handle<v8::String> str = object->ToString();
+ v8::Handle<v8::String> str = object.As<v8::String>();
int length = str->Utf8Length() + 1;
char* utf8Chars = reinterpret_cast<char*>(malloc(length));
str->WriteUtf8(utf8Chars, length, 0, v8::String::HINT_MANY_WRITES_EXPECTED);
« no previous file with comments | « Source/bindings/v8/ScriptDebugServer.cpp ('k') | Source/bindings/v8/custom/V8WindowCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698