[parser] Fix unsafe object access in test-parsing
Bug: v8:9996 Change-Id: I8c39a3a74a58e35eea784b8b26a2c519819b3269 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1924364 Commit-Queue: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Auto-Submit: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#65043}
This commit is contained in:
parent
7935d1969b
commit
96b3ff0257
@ -3308,7 +3308,7 @@ TEST(SerializationOfMaybeAssignmentFlag) {
|
||||
v8::Local<v8::Value> v = CompileRun(src);
|
||||
i::Handle<i::Object> o = v8::Utils::OpenHandle(*v);
|
||||
i::Handle<i::JSFunction> f = i::Handle<i::JSFunction>::cast(o);
|
||||
i::Context context = f->context();
|
||||
i::Handle<i::Context> context(f->context(), isolate);
|
||||
i::AstValueFactory avf(&zone, isolate->ast_string_constants(),
|
||||
HashSeed(isolate));
|
||||
const i::AstRawString* name = avf.GetOneByteString("result");
|
||||
@ -3318,7 +3318,7 @@ TEST(SerializationOfMaybeAssignmentFlag) {
|
||||
i::DeclarationScope* script_scope =
|
||||
new (&zone) i::DeclarationScope(&zone, &avf);
|
||||
i::Scope* s = i::Scope::DeserializeScopeChain(
|
||||
isolate, &zone, context.scope_info(), script_scope, &avf,
|
||||
isolate, &zone, context->scope_info(), script_scope, &avf,
|
||||
i::Scope::DeserializationMode::kIncludingVariables);
|
||||
CHECK(s != script_scope);
|
||||
CHECK_NOT_NULL(name);
|
||||
@ -3358,7 +3358,7 @@ TEST(IfArgumentsArrayAccessedThenParametersMaybeAssigned) {
|
||||
v8::Local<v8::Value> v = CompileRun(src);
|
||||
i::Handle<i::Object> o = v8::Utils::OpenHandle(*v);
|
||||
i::Handle<i::JSFunction> f = i::Handle<i::JSFunction>::cast(o);
|
||||
i::Context context = f->context();
|
||||
i::Handle<i::Context> context(f->context(), isolate);
|
||||
i::AstValueFactory avf(&zone, isolate->ast_string_constants(),
|
||||
HashSeed(isolate));
|
||||
const i::AstRawString* name_x = avf.GetOneByteString("x");
|
||||
@ -3367,7 +3367,7 @@ TEST(IfArgumentsArrayAccessedThenParametersMaybeAssigned) {
|
||||
i::DeclarationScope* script_scope =
|
||||
new (&zone) i::DeclarationScope(&zone, &avf);
|
||||
i::Scope* s = i::Scope::DeserializeScopeChain(
|
||||
isolate, &zone, context.scope_info(), script_scope, &avf,
|
||||
isolate, &zone, context->scope_info(), script_scope, &avf,
|
||||
i::Scope::DeserializationMode::kIncludingVariables);
|
||||
CHECK(s != script_scope);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user