@@ -18,6 +18,7 @@ bool JSONParser::Parse(const std::string& content) { |
18 | 18 | DCHECK(!parsed_); |
19 | 19 |
|
20 | 20 | Isolate* isolate = isolate_.get(); |
| 21 | + v8::Locker locker(isolate); |
21 | 22 | v8::Isolate::Scope isolate_scope(isolate); |
22 | 23 | v8::HandleScope handle_scope(isolate); |
23 | 24 |
|
@@ -47,6 +48,7 @@ bool JSONParser::Parse(const std::string& content) { |
47 | 48 | std::optional<std::string> JSONParser::GetTopLevelStringField( |
48 | 49 | std::string_view field) { |
49 | 50 | Isolate* isolate = isolate_.get(); |
| 51 | + v8::Locker locker(isolate); |
50 | 52 | v8::Isolate::Scope isolate_scope(isolate); |
51 | 53 | v8::HandleScope handle_scope(isolate); |
52 | 54 |
|
@@ -73,6 +75,7 @@ std::optional<std::string> JSONParser::GetTopLevelStringField( |
73 | 75 |
|
74 | 76 | std::optional<bool> JSONParser::GetTopLevelBoolField(std::string_view field) { |
75 | 77 | Isolate* isolate = isolate_.get(); |
| 78 | + v8::Locker locker(isolate); |
76 | 79 | v8::Isolate::Scope isolate_scope(isolate); |
77 | 80 | v8::HandleScope handle_scope(isolate); |
78 | 81 |
|
@@ -105,6 +108,8 @@ std::optional<bool> JSONParser::GetTopLevelBoolField(std::string_view field) { |
105 | 108 | std::optional<JSONParser::StringDict> JSONParser::GetTopLevelStringDict( |
106 | 109 | std::string_view field) { |
107 | 110 | Isolate* isolate = isolate_.get(); |
| 111 | + v8::Locker locker(isolate); |
| 112 | + v8::Isolate::Scope isolate_scope(isolate); |
108 | 113 | v8::HandleScope handle_scope(isolate); |
109 | 114 | Local<Context> context = context_.Get(isolate); |
110 | 115 | Local<Object> content_object = content_.Get(isolate); |
|