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

Side by Side Diff: src/api.cc

Issue 888613002: Initial switch to Chromium-style CHECK_* and DCHECK_* macros. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: CHECK_NULL/NOT_NULL is back. Created 5 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 | « include/v8-profiler.h ('k') | src/arm/code-stubs-arm.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 4978 matching lines...) Expand 10 before | Expand all | Expand 10 after
4989 return Utils::ToLocal(value); 4989 return Utils::ToLocal(value);
4990 } 4990 }
4991 4991
4992 4992
4993 void v8::Object::SetInternalField(int index, v8::Handle<Value> value) { 4993 void v8::Object::SetInternalField(int index, v8::Handle<Value> value) {
4994 i::Handle<i::JSObject> obj = Utils::OpenHandle(this); 4994 i::Handle<i::JSObject> obj = Utils::OpenHandle(this);
4995 const char* location = "v8::Object::SetInternalField()"; 4995 const char* location = "v8::Object::SetInternalField()";
4996 if (!InternalFieldOK(obj, index, location)) return; 4996 if (!InternalFieldOK(obj, index, location)) return;
4997 i::Handle<i::Object> val = Utils::OpenHandle(*value); 4997 i::Handle<i::Object> val = Utils::OpenHandle(*value);
4998 obj->SetInternalField(index, *val); 4998 obj->SetInternalField(index, *val);
4999 DCHECK_EQ(value, GetInternalField(index)); 4999 DCHECK(value->Equals(GetInternalField(index)));
5000 } 5000 }
5001 5001
5002 5002
5003 void* v8::Object::SlowGetAlignedPointerFromInternalField(int index) { 5003 void* v8::Object::SlowGetAlignedPointerFromInternalField(int index) {
5004 i::Handle<i::JSObject> obj = Utils::OpenHandle(this); 5004 i::Handle<i::JSObject> obj = Utils::OpenHandle(this);
5005 const char* location = "v8::Object::GetAlignedPointerFromInternalField()"; 5005 const char* location = "v8::Object::GetAlignedPointerFromInternalField()";
5006 if (!InternalFieldOK(obj, index, location)) return NULL; 5006 if (!InternalFieldOK(obj, index, location)) return NULL;
5007 return DecodeSmiToAligned(obj->GetInternalField(index), location); 5007 return DecodeSmiToAligned(obj->GetInternalField(index), location);
5008 } 5008 }
5009 5009
(...skipping 2659 matching lines...) Expand 10 before | Expand all | Expand 10 after
7669 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7669 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7670 Address callback_address = 7670 Address callback_address =
7671 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7671 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7672 VMState<EXTERNAL> state(isolate); 7672 VMState<EXTERNAL> state(isolate);
7673 ExternalCallbackScope call_scope(isolate, callback_address); 7673 ExternalCallbackScope call_scope(isolate, callback_address);
7674 callback(info); 7674 callback(info);
7675 } 7675 }
7676 7676
7677 7677
7678 } } // namespace v8::internal 7678 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8-profiler.h ('k') | src/arm/code-stubs-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698