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

Unified Diff: src/parsing/scanner.cc

Issue 2345053003: Behold, a unit test for Scanner::BookmarkScope (& scanner bookmarking). (Closed)
Patch Set: Rebase & fix .gyp file. Created 4 years, 3 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 | « src/parsing/scanner.h ('k') | test/cctest/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/scanner.cc
diff --git a/src/parsing/scanner.cc b/src/parsing/scanner.cc
index be4100a0971688dea6165b9bf77cabe8a190185b..ea0b58cdf72ed0e7f39a630fd4e2cee736e01897 100644
--- a/src/parsing/scanner.cc
+++ b/src/parsing/scanner.cc
@@ -1608,9 +1608,9 @@ void Scanner::ResetToBookmark() {
bookmark_c0_ = kBookmarkWasApplied;
}
-
-bool Scanner::BookmarkHasBeenSet() { return bookmark_c0_ >= 0; }
-
+bool Scanner::BookmarkHasBeenSet() {
+ return bookmark_c0_ != kNoBookmark && bookmark_c0_ != kBookmarkWasApplied;
+}
bool Scanner::BookmarkHasBeenReset() {
return bookmark_c0_ == kBookmarkWasApplied;
« no previous file with comments | « src/parsing/scanner.h ('k') | test/cctest/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698