defedd0c26
... by adding atomic (relaxed) accessor's for a map's constructor_or_backpointer field, and using them in the two functions. Bug: chromium:1250216, v8:7790 Change-Id: I3416799cca73792ff5f8963685274ad9afdc6229 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3162129 Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/main@{#76876}
17 lines
524 B
JavaScript
17 lines
524 B
JavaScript
// Copyright 2021 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
{
|
|
const realm = Realm.createAllowCrossRealmAccess();
|
|
const foo = Realm.eval(realm, "function foo() {return globalThis.foo}; foo");
|
|
assertSame(foo(), foo);
|
|
}
|
|
|
|
{
|
|
const realm = Realm.createAllowCrossRealmAccess();
|
|
const foo = Realm.eval(realm, "function foo() {return globalThis.foo}; foo");
|
|
assertSame(foo(), foo);
|
|
Realm.detachGlobal(realm);
|
|
}
|