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

Side by Side Diff: third_party/WebKit/Source/web/WebLeakDetector.cpp

Issue 1728803002: Rename WorkerThread to WorkerScript Base URL: https://chromium.googlesource.com/chromium/src.git@workerscript-controller
Patch Set: Created 4 years, 9 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) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 21 matching lines...) Expand all
32 32
33 #include "bindings/core/v8/ScriptPromise.h" 33 #include "bindings/core/v8/ScriptPromise.h"
34 #include "bindings/core/v8/V8Binding.h" 34 #include "bindings/core/v8/V8Binding.h"
35 #include "bindings/core/v8/V8GCController.h" 35 #include "bindings/core/v8/V8GCController.h"
36 #include "core/dom/ActiveDOMObject.h" 36 #include "core/dom/ActiveDOMObject.h"
37 #include "core/dom/Document.h" 37 #include "core/dom/Document.h"
38 #include "core/editing/spellcheck/SpellChecker.h" 38 #include "core/editing/spellcheck/SpellChecker.h"
39 #include "core/fetch/MemoryCache.h" 39 #include "core/fetch/MemoryCache.h"
40 #include "core/inspector/InstanceCounters.h" 40 #include "core/inspector/InstanceCounters.h"
41 #include "core/layout/LayoutObject.h" 41 #include "core/layout/LayoutObject.h"
42 #include "core/workers/WorkerThread.h" 42 #include "core/workers/WorkerScript.h"
43 #include "modules/webaudio/AudioNode.h" 43 #include "modules/webaudio/AudioNode.h"
44 #include "platform/Timer.h" 44 #include "platform/Timer.h"
45 #include "public/web/WebDocument.h" 45 #include "public/web/WebDocument.h"
46 #include "public/web/WebFrame.h" 46 #include "public/web/WebFrame.h"
47 #include "web/WebLocalFrameImpl.h" 47 #include "web/WebLocalFrameImpl.h"
48 48
49 namespace blink { 49 namespace blink {
50 50
51 namespace { 51 namespace {
52 52
(...skipping 29 matching lines...) Expand all
82 v8::Isolate* isolate = v8::Isolate::GetCurrent(); 82 v8::Isolate* isolate = v8::Isolate::GetCurrent();
83 v8::HandleScope handleScope(isolate); 83 v8::HandleScope handleScope(isolate);
84 84
85 // For example, calling isValidEmailAddress in EmailInputType.cpp with a 85 // For example, calling isValidEmailAddress in EmailInputType.cpp with a
86 // non-empty string creates a static ScriptRegexp value which holds a 86 // non-empty string creates a static ScriptRegexp value which holds a
87 // V8PerContextData indirectly. This affects the number of V8PerContextData. 87 // V8PerContextData indirectly. This affects the number of V8PerContextData.
88 // To ensure that context data is created, call ensureScriptRegexpContext 88 // To ensure that context data is created, call ensureScriptRegexpContext
89 // here. 89 // here.
90 V8PerIsolateData::from(isolate)->ensureScriptRegexpContext(); 90 V8PerIsolateData::from(isolate)->ensureScriptRegexpContext();
91 91
92 WorkerThread::terminateAndWaitForAllWorkers(); 92 WorkerScript::terminateAndWaitForAllWorkers();
93 memoryCache()->evictResources(); 93 memoryCache()->evictResources();
94 94
95 // If the spellchecker is allowed to continue issuing requests while the 95 // If the spellchecker is allowed to continue issuing requests while the
96 // leak detector runs, leaks may flakily be reported as the requests keep 96 // leak detector runs, leaks may flakily be reported as the requests keep
97 // their associated element (and document) alive. 97 // their associated element (and document) alive.
98 // 98 //
99 // Stop the spellchecker to prevent this. 99 // Stop the spellchecker to prevent this.
100 if (frame->isWebLocalFrame()) { 100 if (frame->isWebLocalFrame()) {
101 WebLocalFrameImpl* localFrame = toWebLocalFrameImpl(frame); 101 WebLocalFrameImpl* localFrame = toWebLocalFrameImpl(frame);
102 SpellChecker& spellChecker = localFrame->frame()->spellChecker(); 102 SpellChecker& spellChecker = localFrame->frame()->spellChecker();
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 160 }
161 161
162 } // namespace 162 } // namespace
163 163
164 WebLeakDetector* WebLeakDetector::create(WebLeakDetectorClient* client) 164 WebLeakDetector* WebLeakDetector::create(WebLeakDetectorClient* client)
165 { 165 {
166 return new WebLeakDetectorImpl(client); 166 return new WebLeakDetectorImpl(client);
167 } 167 }
168 168
169 } // namespace blink 169 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698