| Index: Source/web/WebKit.cpp
|
| diff --git a/Source/web/WebKit.cpp b/Source/web/WebKit.cpp
|
| index a6d8754f039f03651bf6d9c7c4ae1cc86cba318e..bc93ccb6aa27231197d420c666ae3c6c054d2260 100644
|
| --- a/Source/web/WebKit.cpp
|
| +++ b/Source/web/WebKit.cpp
|
| @@ -82,6 +82,13 @@ public:
|
| }
|
| };
|
|
|
| +void partitionAlmostFullHandler()
|
| +{
|
| + v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
| + if (isolate)
|
| + isolate->LowMemoryNotification();
|
| +}
|
| +
|
| } // namespace
|
|
|
| static WebThread::TaskObserver* s_endOfTaskRunner = 0;
|
| @@ -109,6 +116,8 @@ void initialize(Platform* platform)
|
| s_endOfTaskRunner = new EndOfTaskRunner;
|
| currentThread->addTaskObserver(s_endOfTaskRunner);
|
| }
|
| +
|
| + partitionSetFreeUpMemoryCallback(partitionAlmostFullHandler);
|
| }
|
|
|
| v8::Isolate* mainThreadIsolate()
|
| @@ -205,6 +214,8 @@ void shutdown()
|
| s_messageLoopInterruptor = 0;
|
| }
|
|
|
| + partitionSetFreeUpMemoryCallback(nullptr);
|
| +
|
| v8::Isolate* isolate = V8PerIsolateData::mainThreadIsolate();
|
| V8PerIsolateData::willBeDestroyed(isolate);
|
|
|
|
|