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

Side by Side Diff: src/api.cc

Issue 1126043004: Migrate error messages, part 10. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixed and rebased Created 5 years, 7 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 | src/api-natives.cc » ('j') | 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 #include "src/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 4382 matching lines...) Expand 10 before | Expand all | Expand 10 after
4393 } 4393 }
4394 4394
4395 4395
4396 Handle<Value> Function::GetDisplayName() const { 4396 Handle<Value> Function::GetDisplayName() const {
4397 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); 4397 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
4398 ENTER_V8(isolate); 4398 ENTER_V8(isolate);
4399 i::Handle<i::JSFunction> func = Utils::OpenHandle(this); 4399 i::Handle<i::JSFunction> func = Utils::OpenHandle(this);
4400 i::Handle<i::String> property_name = 4400 i::Handle<i::String> property_name =
4401 isolate->factory()->NewStringFromStaticChars("displayName"); 4401 isolate->factory()->NewStringFromStaticChars("displayName");
4402 i::Handle<i::Object> value = 4402 i::Handle<i::Object> value =
4403 i::JSObject::GetDataProperty(func, property_name); 4403 i::JSReceiver::GetDataProperty(func, property_name);
4404 if (value->IsString()) { 4404 if (value->IsString()) {
4405 i::Handle<i::String> name = i::Handle<i::String>::cast(value); 4405 i::Handle<i::String> name = i::Handle<i::String>::cast(value);
4406 if (name->length() > 0) return Utils::ToLocal(name); 4406 if (name->length() > 0) return Utils::ToLocal(name);
4407 } 4407 }
4408 return ToApiHandle<Primitive>(isolate->factory()->undefined_value()); 4408 return ToApiHandle<Primitive>(isolate->factory()->undefined_value());
4409 } 4409 }
4410 4410
4411 4411
4412 ScriptOrigin Function::GetScriptOrigin() const { 4412 ScriptOrigin Function::GetScriptOrigin() const {
4413 i::Handle<i::JSFunction> func = Utils::OpenHandle(this); 4413 i::Handle<i::JSFunction> func = Utils::OpenHandle(this);
(...skipping 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after
6232 RETURN_TO_LOCAL_UNCHECKED(Then(context, handler), Promise); 6232 RETURN_TO_LOCAL_UNCHECKED(Then(context, handler), Promise);
6233 } 6233 }
6234 6234
6235 6235
6236 bool Promise::HasHandler() { 6236 bool Promise::HasHandler() {
6237 i::Handle<i::JSObject> promise = Utils::OpenHandle(this); 6237 i::Handle<i::JSObject> promise = Utils::OpenHandle(this);
6238 i::Isolate* isolate = promise->GetIsolate(); 6238 i::Isolate* isolate = promise->GetIsolate();
6239 LOG_API(isolate, "Promise::HasRejectHandler"); 6239 LOG_API(isolate, "Promise::HasRejectHandler");
6240 ENTER_V8(isolate); 6240 ENTER_V8(isolate);
6241 i::Handle<i::Symbol> key = isolate->factory()->promise_has_handler_symbol(); 6241 i::Handle<i::Symbol> key = isolate->factory()->promise_has_handler_symbol();
6242 return i::JSObject::GetDataProperty(promise, key)->IsTrue(); 6242 return i::JSReceiver::GetDataProperty(promise, key)->IsTrue();
6243 } 6243 }
6244 6244
6245 6245
6246 bool v8::ArrayBuffer::IsExternal() const { 6246 bool v8::ArrayBuffer::IsExternal() const {
6247 return Utils::OpenHandle(this)->is_external(); 6247 return Utils::OpenHandle(this)->is_external();
6248 } 6248 }
6249 6249
6250 6250
6251 bool v8::ArrayBuffer::IsNeuterable() const { 6251 bool v8::ArrayBuffer::IsNeuterable() const {
6252 return Utils::OpenHandle(this)->is_neuterable(); 6252 return Utils::OpenHandle(this)->is_neuterable();
(...skipping 1779 matching lines...) Expand 10 before | Expand all | Expand 10 after
8032 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 8032 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
8033 Address callback_address = 8033 Address callback_address =
8034 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8034 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8035 VMState<EXTERNAL> state(isolate); 8035 VMState<EXTERNAL> state(isolate);
8036 ExternalCallbackScope call_scope(isolate, callback_address); 8036 ExternalCallbackScope call_scope(isolate, callback_address);
8037 callback(info); 8037 callback(info);
8038 } 8038 }
8039 8039
8040 8040
8041 } } // namespace v8::internal 8041 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/api-natives.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698