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

Side by Side Diff: include/v8.h

Issue 2697683002: Use internalized strings for v8::Template::Set shorthand. (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** \mainpage V8 API Reference Guide 5 /** \mainpage V8 API Reference Guide
6 * 6 *
7 * V8 is Google's open source JavaScript engine. 7 * V8 is Google's open source JavaScript engine.
8 * 8 *
9 * This set of documents provides reference material generated from the 9 * This set of documents provides reference material generated from the
10 * V8 header file, include/v8.h. 10 * V8 header file, include/v8.h.
(...skipping 9064 matching lines...) Expand 10 before | Expand all | Expand 10 after
9075 9075
9076 const ScriptOriginOptions& ScriptCompiler::Source::GetResourceOptions() const { 9076 const ScriptOriginOptions& ScriptCompiler::Source::GetResourceOptions() const {
9077 return resource_options; 9077 return resource_options;
9078 } 9078 }
9079 9079
9080 Local<Boolean> Boolean::New(Isolate* isolate, bool value) { 9080 Local<Boolean> Boolean::New(Isolate* isolate, bool value) {
9081 return value ? True(isolate) : False(isolate); 9081 return value ? True(isolate) : False(isolate);
9082 } 9082 }
9083 9083
9084 void Template::Set(Isolate* isolate, const char* name, Local<Data> value) { 9084 void Template::Set(Isolate* isolate, const char* name, Local<Data> value) {
9085 Set(String::NewFromUtf8(isolate, name, NewStringType::kNormal) 9085 Set(String::NewFromUtf8(isolate, name, NewStringType::kInternalized)
9086 .ToLocalChecked(), 9086 .ToLocalChecked(),
9087 value); 9087 value);
9088 } 9088 }
9089 9089
9090 9090
9091 Local<Value> Object::GetInternalField(int index) { 9091 Local<Value> Object::GetInternalField(int index) {
9092 #ifndef V8_ENABLE_CHECKS 9092 #ifndef V8_ENABLE_CHECKS
9093 typedef internal::Object O; 9093 typedef internal::Object O;
9094 typedef internal::HeapObject HO; 9094 typedef internal::HeapObject HO;
9095 typedef internal::Internals I; 9095 typedef internal::Internals I;
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
9864 */ 9864 */
9865 9865
9866 9866
9867 } // namespace v8 9867 } // namespace v8
9868 9868
9869 9869
9870 #undef TYPE_CHECK 9870 #undef TYPE_CHECK
9871 9871
9872 9872
9873 #endif // INCLUDE_V8_H_ 9873 #endif // INCLUDE_V8_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698