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

Unified Diff: third_party/WebKit/Source/core/dom/ClassicPendingScript.cpp

Issue 2837413002: 1. Check that ClassicPendingScript is not accessed after prefinalizer explicitly (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/dom/ClassicPendingScript.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/ClassicPendingScript.cpp
diff --git a/third_party/WebKit/Source/core/dom/ClassicPendingScript.cpp b/third_party/WebKit/Source/core/dom/ClassicPendingScript.cpp
index 17de68f72fe09fdad6943ec057ccf2a78e00ed93..e1c747e4e89d3a3c93f5b5fbca2ec03ba70c4d6c 100644
--- a/third_party/WebKit/Source/core/dom/ClassicPendingScript.cpp
+++ b/third_party/WebKit/Source/core/dom/ClassicPendingScript.cpp
@@ -41,6 +41,7 @@ ClassicPendingScript::~ClassicPendingScript() {}
NOINLINE void ClassicPendingScript::CheckState() const {
// TODO(hiroshige): Turn these CHECK()s into DCHECK() before going to beta.
+ CHECK(!prefinalizer_called_);
CHECK(GetElement());
CHECK(GetResource() || !streamer_);
CHECK(!streamer_ || streamer_->GetResource() == GetResource());
@@ -48,6 +49,7 @@ NOINLINE void ClassicPendingScript::CheckState() const {
NOINLINE void ClassicPendingScript::Dispose() {
PendingScript::Dispose();
+ prefinalizer_called_ = true;
}
void ClassicPendingScript::DisposeInternal() {
« no previous file with comments | « third_party/WebKit/Source/core/dom/ClassicPendingScript.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698