[d8] Remove unnecessary calls to v8::Global::Reset() in Realm teardown

Change-Id: Id4f99539b8583cef56fd33d2e939a2d6024384f9
Reviewed-on: https://chromium-review.googlesource.com/c/1387989
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58452}
This commit is contained in:
Adam Klein 2018-12-20 15:18:51 -08:00 committed by Commit Bot
parent 646051f901
commit a70e537272

View File

@ -939,14 +939,9 @@ PerIsolateData::RealmScope::~RealmScope() {
Global<Context>& realm = data_->realms_[i];
if (realm.IsEmpty()) continue;
DisposeModuleEmbedderData(realm.Get(data_->isolate_));
// TODO(adamk): No need to reset manually, Globals reset when destructed.
realm.Reset();
}
data_->realm_count_ = 0;
delete[] data_->realms_;
// TODO(adamk): No need to reset manually, Globals reset when destructed.
if (!data_->realm_shared_.IsEmpty())
data_->realm_shared_.Reset();
}