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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp

Issue 2640163004: Replace ENABLE(ASSERT) with DCHECK_IS_ON(). (Closed)
Patch Set: Created 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 } 358 }
359 359
360 void Free(void* data, size_t size) override { 360 void Free(void* data, size_t size) override {
361 WTF::ArrayBufferContents::freeMemory(data, size); 361 WTF::ArrayBufferContents::freeMemory(data, size);
362 } 362 }
363 }; 363 };
364 364
365 } // namespace 365 } // namespace
366 366
367 static void adjustAmountOfExternalAllocatedMemory(int64_t diff) { 367 static void adjustAmountOfExternalAllocatedMemory(int64_t diff) {
368 #if ENABLE(ASSERT) 368 #if DCHECK_IS_ON()
369 DEFINE_THREAD_SAFE_STATIC_LOCAL(int64_t, processTotal, new int64_t(0)); 369 DEFINE_THREAD_SAFE_STATIC_LOCAL(int64_t, processTotal, new int64_t(0));
370 DEFINE_THREAD_SAFE_STATIC_LOCAL(Mutex, mutex, new Mutex); 370 DEFINE_THREAD_SAFE_STATIC_LOCAL(Mutex, mutex, new Mutex);
371 { 371 {
372 MutexLocker locker(mutex); 372 MutexLocker locker(mutex);
373 373
374 processTotal += diff; 374 processTotal += diff;
375 DCHECK_GE(processTotal, 0) << "total amount = " << processTotal 375 DCHECK_GE(processTotal, 0) << "total amount = " << processTotal
376 << ", diff = " << diff; 376 << ", diff = " << diff;
377 } 377 }
378 #endif 378 #endif
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 v8::Isolate::kMessageLog); 522 v8::Isolate::kMessageLog);
523 isolate->SetFatalErrorHandler(reportFatalErrorInWorker); 523 isolate->SetFatalErrorHandler(reportFatalErrorInWorker);
524 524
525 uint32_t here; 525 uint32_t here;
526 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here) - 526 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here) -
527 kWorkerMaxStackSize); 527 kWorkerMaxStackSize);
528 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); 528 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker);
529 } 529 }
530 530
531 } // namespace blink 531 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698