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

Unified Diff: src/json-parser.cc

Issue 2037363002: [json] check and handle interrupts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 4 years, 6 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 | « no previous file | src/json-stringifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/json-parser.cc
diff --git a/src/json-parser.cc b/src/json-parser.cc
index 784d55d5514e778daf81664b67c58bd56bf7390c..29a7af9c73803bd041915794e903dbf72f25a697 100644
--- a/src/json-parser.cc
+++ b/src/json-parser.cc
@@ -249,10 +249,9 @@ Handle<Object> JsonParser<seq_one_byte>::ParseJsonValue() {
return Handle<Object>::null();
}
- if (stack_check.InterruptRequested()) {
- ExecutionAccess access(isolate_);
- // Avoid blocking GC in long running parser (v8:3974).
- isolate_->stack_guard()->HandleGCInterrupt();
+ if (stack_check.InterruptRequested() &&
+ isolate_->stack_guard()->HandleInterrupts()->IsException()) {
+ return Handle<Object>::null();
}
if (c0_ == '"') return ParseJsonString();
« no previous file with comments | « no previous file | src/json-stringifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698