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

Unified Diff: Source/bindings/scripts/code_generator_v8.pm

Issue 116983005: Use v8AtomicString instead of v8::String::NewFromUtf8 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 | « no previous file | Source/bindings/templates/attributes.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/code_generator_v8.pm
diff --git a/Source/bindings/scripts/code_generator_v8.pm b/Source/bindings/scripts/code_generator_v8.pm
index b73c762d020bdae9fd89cafa7d5731884d83e8c8..db30968af8c8b0b9848c3ef0ece128a4ada6eaea 100644
--- a/Source/bindings/scripts/code_generator_v8.pm
+++ b/Source/bindings/scripts/code_generator_v8.pm
@@ -1248,7 +1248,7 @@ static void ${funcName}OriginSafeMethodGetter${forMainWorldSuffix}(const v8::Pro
return;
}
- v8::Local<v8::Value> hiddenValue = info.This()->GetHiddenValue(v8::String::NewFromUtf8(info.GetIsolate(), "${funcName}", v8::String::kInternalizedString));
+ v8::Local<v8::Value> hiddenValue = info.This()->GetHiddenValue(v8AtomicString(info.GetIsolate(), "${funcName}"));
if (!hiddenValue.IsEmpty()) {
v8SetReturnValue(info, hiddenValue);
return;
@@ -1517,7 +1517,7 @@ END
if ($attrCached) {
$imp = 1;
$code .= <<END;
- v8::Handle<v8::String> propertyName = v8::String::NewFromUtf8(info.GetIsolate(), "${attrName}", v8::String::kInternalizedString);
+ v8::Handle<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "${attrName}");
${implClassName}* imp = ${v8ClassName}::toNative(info.Holder());
if (!imp->$attrCached()) {
v8::Handle<v8::Value> jsValue = info.Holder()->GetHiddenValue(propertyName);
@@ -2137,7 +2137,7 @@ END
if ($attrCached) {
$code .= <<END;
- info.Holder()->DeleteHiddenValue(v8::String::NewFromUtf8(info.GetIsolate(), "${attrName}", v8::String::kInternalizedString)); // Invalidate the cached value.
+ info.Holder()->DeleteHiddenValue(v8AtomicString(info.GetIsolate(), "${attrName}")); // Invalidate the cached value.
END
}
@@ -3175,7 +3175,7 @@ v8::Handle<v8::FunctionTemplate> ${v8ClassName}Constructor::domTemplate(v8::Isol
v8::Local<v8::ObjectTemplate> instanceTemplate = result->InstanceTemplate();
instanceTemplate->SetInternalFieldCount(${v8ClassName}::internalFieldCount);
- result->SetClassName(v8::String::NewFromUtf8(isolate, "${implClassName}", v8::String::kInternalizedString));
+ result->SetClassName(v8AtomicString(isolate, "${implClassName}"));
result->Inherit(${v8ClassName}::domTemplate(isolate, currentWorldType));
data->setPrivateTemplate(currentWorldType, &privateTemplateUniqueKey, result);
@@ -3360,7 +3360,7 @@ sub GenerateStaticAttribute
my $conditionalString = GenerateConditionalString($attribute);
$code .= "#if ${conditionalString}\n" if $conditionalString;
- $code .= " functionTemplate->SetNativeDataProperty(v8::String::NewFromUtf8(isolate, \"$attrName\", v8::String::kInternalizedString), $getter, $setter, v8::External::New(isolate, $data), $propAttribute, v8::Handle<v8::AccessorSignature>(), $accessControl);\n";
+ $code .= " functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, \"$attrName\"), $getter, $setter, v8::External::New(isolate, $data), $propAttribute, v8::Handle<v8::AccessorSignature>(), $accessControl);\n";
$code .= "#endif // ${conditionalString}\n" if $conditionalString;
return $code;
« no previous file with comments | « no previous file | Source/bindings/templates/attributes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698