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

Side by Side Diff: src/d8.cc

Issue 1129543002: [d8] Make Realm.dispose() trigger a ContextDisposedNotification (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 // Defined when linking against shared lib on Windows. 6 // Defined when linking against shared lib on Windows.
7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) 7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED)
8 #define V8_SHARED 8 #define V8_SHARED
9 #endif 9 #endif
10 10
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 Isolate* isolate = args.GetIsolate(); 494 Isolate* isolate = args.GetIsolate();
495 PerIsolateData* data = PerIsolateData::Get(isolate); 495 PerIsolateData* data = PerIsolateData::Get(isolate);
496 int index = data->RealmIndexOrThrow(args, 0); 496 int index = data->RealmIndexOrThrow(args, 0);
497 if (index == -1) return; 497 if (index == -1) return;
498 if (index == 0 || 498 if (index == 0 ||
499 index == data->realm_current_ || index == data->realm_switch_) { 499 index == data->realm_current_ || index == data->realm_switch_) {
500 Throw(args.GetIsolate(), "Invalid realm index"); 500 Throw(args.GetIsolate(), "Invalid realm index");
501 return; 501 return;
502 } 502 }
503 data->realms_[index].Reset(); 503 data->realms_[index].Reset();
504 isolate->ContextDisposedNotification();
505 isolate->IdleNotificationDeadline(g_platform->MonotonicallyIncreasingTime());
504 } 506 }
505 507
506 508
507 // Realm.switch(i) switches to the realm i for consecutive interactive inputs. 509 // Realm.switch(i) switches to the realm i for consecutive interactive inputs.
508 void Shell::RealmSwitch(const v8::FunctionCallbackInfo<v8::Value>& args) { 510 void Shell::RealmSwitch(const v8::FunctionCallbackInfo<v8::Value>& args) {
509 Isolate* isolate = args.GetIsolate(); 511 Isolate* isolate = args.GetIsolate();
510 PerIsolateData* data = PerIsolateData::Get(isolate); 512 PerIsolateData* data = PerIsolateData::Get(isolate);
511 int index = data->RealmIndexOrThrow(args, 0); 513 int index = data->RealmIndexOrThrow(args, 0);
512 if (index == -1) return; 514 if (index == -1) return;
513 data->realm_switch_ = index; 515 data->realm_switch_ = index;
(...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after
1746 } 1748 }
1747 1749
1748 } // namespace v8 1750 } // namespace v8
1749 1751
1750 1752
1751 #ifndef GOOGLE3 1753 #ifndef GOOGLE3
1752 int main(int argc, char* argv[]) { 1754 int main(int argc, char* argv[]) {
1753 return v8::Shell::Main(argc, argv); 1755 return v8::Shell::Main(argc, argv);
1754 } 1756 }
1755 #endif 1757 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698