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

Unified Diff: src/compiler.h

Issue 724023002: Soft fail for invalid cache data. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: use flag to indicate rejection Created 6 years, 1 month 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 | « src/api.cc ('k') | src/compiler.cc » ('j') | test/cctest/test-api.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.h
diff --git a/src/compiler.h b/src/compiler.h
index 822151d64a9934cd79b229bdcd5325f2bef3e229..c8073feda90dd2875a8783ec829cc2feab5ac207 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -39,6 +39,9 @@ class ScriptData {
const byte* data() const { return data_; }
int length() const { return length_; }
+ bool rejected() const { return rejected_; }
+
+ void Reject() { rejected_ = true; }
void AcquireDataOwnership() {
DCHECK(!owns_data_);
@@ -51,7 +54,8 @@ class ScriptData {
}
private:
- bool owns_data_;
+ bool owns_data_ : 1;
+ bool rejected_ : 1;
const byte* data_;
int length_;
« no previous file with comments | « src/api.cc ('k') | src/compiler.cc » ('j') | test/cctest/test-api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698