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

Side by Side Diff: src/api.cc

Issue 760213005: Turn on DCHECKs and other debugging code if dcheck_always_on is 1 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updaets Created 6 years 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 | « build/toolchain.gypi ('k') | src/checks.h » ('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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 isolate->stack_guard()->SetStackLimit(limit); 332 isolate->stack_guard()->SetStackLimit(limit);
333 } 333 }
334 334
335 isolate->set_max_available_threads(constraints.max_available_threads()); 335 isolate->set_max_available_threads(constraints.max_available_threads());
336 } 336 }
337 337
338 338
339 i::Object** V8::GlobalizeReference(i::Isolate* isolate, i::Object** obj) { 339 i::Object** V8::GlobalizeReference(i::Isolate* isolate, i::Object** obj) {
340 LOG_API(isolate, "Persistent::New"); 340 LOG_API(isolate, "Persistent::New");
341 i::Handle<i::Object> result = isolate->global_handles()->Create(*obj); 341 i::Handle<i::Object> result = isolate->global_handles()->Create(*obj);
342 #ifdef DEBUG 342 #ifdef VERIFY_HEAP
343 (*obj)->ObjectVerify(); 343 (*obj)->ObjectVerify();
344 #endif // DEBUG 344 #endif // VERIFY_HEAP
345 return result.location(); 345 return result.location();
346 } 346 }
347 347
348 348
349 i::Object** V8::CopyPersistent(i::Object** obj) { 349 i::Object** V8::CopyPersistent(i::Object** obj) {
350 i::Handle<i::Object> result = i::GlobalHandles::CopyGlobal(obj); 350 i::Handle<i::Object> result = i::GlobalHandles::CopyGlobal(obj);
351 #ifdef DEBUG 351 #ifdef VERIFY_HEAP
352 (*obj)->ObjectVerify(); 352 (*obj)->ObjectVerify();
353 #endif // DEBUG 353 #endif // VERIFY_HEAP
354 return result.location(); 354 return result.location();
355 } 355 }
356 356
357 357
358 void V8::MakeWeak(i::Object** object, void* parameters, 358 void V8::MakeWeak(i::Object** object, void* parameters,
359 WeakCallback weak_callback, V8::WeakHandleType weak_type) { 359 WeakCallback weak_callback, V8::WeakHandleType weak_type) {
360 i::GlobalHandles::PhantomState phantom; 360 i::GlobalHandles::PhantomState phantom;
361 phantom = weak_type == V8::PhantomHandle ? i::GlobalHandles::Phantom 361 phantom = weak_type == V8::PhantomHandle ? i::GlobalHandles::Phantom
362 : i::GlobalHandles::Nonphantom; 362 : i::GlobalHandles::Nonphantom;
363 i::GlobalHandles::MakeWeak(object, parameters, weak_callback, phantom); 363 i::GlobalHandles::MakeWeak(object, parameters, weak_callback, phantom);
(...skipping 7331 matching lines...) Expand 10 before | Expand all | Expand 10 after
7695 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); 7695 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate());
7696 Address callback_address = 7696 Address callback_address =
7697 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 7697 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
7698 VMState<EXTERNAL> state(isolate); 7698 VMState<EXTERNAL> state(isolate);
7699 ExternalCallbackScope call_scope(isolate, callback_address); 7699 ExternalCallbackScope call_scope(isolate, callback_address);
7700 callback(info); 7700 callback(info);
7701 } 7701 }
7702 7702
7703 7703
7704 } } // namespace v8::internal 7704 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « build/toolchain.gypi ('k') | src/checks.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698