| Index: third_party/WebKit/Source/platform/testing/UnitTestHelpers.cpp
|
| diff --git a/third_party/WebKit/Source/platform/testing/UnitTestHelpers.cpp b/third_party/WebKit/Source/platform/testing/UnitTestHelpers.cpp
|
| index 4c4909b3c16c89b6ba6ec61e9ba12b2b6f8162be..d66bc310ce619cf0584c7e5c09bac75319970434 100644
|
| --- a/third_party/WebKit/Source/platform/testing/UnitTestHelpers.cpp
|
| +++ b/third_party/WebKit/Source/platform/testing/UnitTestHelpers.cpp
|
| @@ -31,6 +31,7 @@
|
| #include "base/path_service.h"
|
| #include "platform/SharedBuffer.h"
|
| #include "platform/Timer.h"
|
| +#include "platform/heap/Handle.h"
|
| #include "public/platform/FilePathConversion.h"
|
| #include "public/platform/Platform.h"
|
| #include "public/platform/WebString.h"
|
| @@ -45,7 +46,12 @@ namespace testing {
|
| void runPendingTasks()
|
| {
|
| Platform::current()->currentThread()->getWebTaskRunner()->postTask(BLINK_FROM_HERE, bind(&exitRunLoop));
|
| +
|
| + // We forbid GC in the tasks. Otherwise the registered GCTaskObserver tries
|
| + // to run GC with NoHeapPointerOnStack.
|
| + ThreadState::current()->enterGCForbiddenScope();
|
| enterRunLoop();
|
| + ThreadState::current()->leaveGCForbiddenScope();
|
| }
|
|
|
| void runDelayedTasks(double delayMs)
|
|
|