Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 352 } else { | 352 } else { |
| 353 TRACE_EVENT_END0("v8", name); | 353 TRACE_EVENT_END0("v8", name); |
| 354 } | 354 } |
| 355 } | 355 } |
| 356 | 356 |
| 357 static void initializeV8Common(v8::Isolate* isolate) | 357 static void initializeV8Common(v8::Isolate* isolate) |
| 358 { | 358 { |
| 359 v8::V8::AddGCPrologueCallback(V8GCController::gcPrologue); | 359 v8::V8::AddGCPrologueCallback(V8GCController::gcPrologue); |
| 360 v8::V8::AddGCEpilogueCallback(V8GCController::gcEpilogue); | 360 v8::V8::AddGCEpilogueCallback(V8GCController::gcEpilogue); |
| 361 | 361 |
| 362 // TODO(binji): where should this go? | |
|
haraken
2015/06/11 05:59:28
I think this is a good place to put this. You can
| |
| 363 if (RuntimeEnabledFeatures::sharedArrayBufferEnabled()) { | |
| 364 const char kSharedArrayBuffer[] = "--harmony-sharedarraybuffer"; | |
|
haraken
2015/06/11 05:59:28
Add static.
jochen (gone - plz use gerrit)
2015/06/11 12:40:28
I'd rather first see test coverage on the v8 side
| |
| 365 v8::V8::SetFlagsFromString(kSharedArrayBuffer, sizeof(kSharedArrayBuffer )); | |
| 366 } | |
| 367 | |
| 362 v8::Debug::SetLiveEditEnabled(isolate, false); | 368 v8::Debug::SetLiveEditEnabled(isolate, false); |
| 363 | 369 |
| 364 isolate->SetAutorunMicrotasks(false); | 370 isolate->SetAutorunMicrotasks(false); |
| 365 } | 371 } |
| 366 | 372 |
| 367 namespace { | 373 namespace { |
| 368 | 374 |
| 369 class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { | 375 class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { |
| 370 virtual void* Allocate(size_t size) override | 376 virtual void* Allocate(size_t size) override |
| 371 { | 377 { |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 474 | 480 |
| 475 v8::V8::AddMessageListener(messageHandlerInWorker); | 481 v8::V8::AddMessageListener(messageHandlerInWorker); |
| 476 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker); | 482 v8::V8::SetFatalErrorHandler(reportFatalErrorInWorker); |
| 477 | 483 |
| 478 uint32_t here; | 484 uint32_t here; |
| 479 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi ze / sizeof(uint32_t*))); | 485 isolate->SetStackLimit(reinterpret_cast<uintptr_t>(&here - kWorkerMaxStackSi ze / sizeof(uint32_t*))); |
| 480 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); | 486 isolate->SetPromiseRejectCallback(promiseRejectHandlerInWorker); |
| 481 } | 487 } |
| 482 | 488 |
| 483 } // namespace blink | 489 } // namespace blink |
| OLD | NEW |