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

Side by Side Diff: src/object-observe.js

Issue 250883002: Fix |RunMicrotasks()| leaking reference to the last context being run on. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: remove external_ Created 6 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 | « src/execution.cc ('k') | src/promise.js » ('j') | 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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 // Drop all splice records on the floor for access-checked objects 427 // Drop all splice records on the floor for access-checked objects
428 (changeRecord.type == 'splice' || 428 (changeRecord.type == 'splice' ||
429 !%IsAccessAllowedForObserver( 429 !%IsAccessAllowedForObserver(
430 callback, changeRecord.object, changeRecord.name))) { 430 callback, changeRecord.object, changeRecord.name))) {
431 return; 431 return;
432 } 432 }
433 433
434 var callbackInfo = CallbackInfoNormalize(callback); 434 var callbackInfo = CallbackInfoNormalize(callback);
435 if (IS_NULL(GetPendingObservers())) { 435 if (IS_NULL(GetPendingObservers())) {
436 SetPendingObservers(nullProtoObject()) 436 SetPendingObservers(nullProtoObject())
437 GetMicrotaskQueue().push(ObserveMicrotaskRunner); 437 EnqueueMicrotask(ObserveMicrotaskRunner);
438 %SetMicrotaskPending(true);
439 } 438 }
440 GetPendingObservers()[callbackInfo.priority] = callback; 439 GetPendingObservers()[callbackInfo.priority] = callback;
441 callbackInfo.push(changeRecord); 440 callbackInfo.push(changeRecord);
442 } 441 }
443 442
444 function ObjectInfoEnqueueExternalChangeRecord(objectInfo, changeRecord, type) { 443 function ObjectInfoEnqueueExternalChangeRecord(objectInfo, changeRecord, type) {
445 if (!ObjectInfoHasActiveObservers(objectInfo)) 444 if (!ObjectInfoHasActiveObservers(objectInfo))
446 return; 445 return;
447 446
448 var hasType = !IS_UNDEFINED(type); 447 var hasType = !IS_UNDEFINED(type);
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 "observe", ArrayObserve, 639 "observe", ArrayObserve,
641 "unobserve", ArrayUnobserve 640 "unobserve", ArrayUnobserve
642 )); 641 ));
643 InstallFunctions(notifierPrototype, DONT_ENUM, $Array( 642 InstallFunctions(notifierPrototype, DONT_ENUM, $Array(
644 "notify", ObjectNotifierNotify, 643 "notify", ObjectNotifierNotify,
645 "performChange", ObjectNotifierPerformChange 644 "performChange", ObjectNotifierPerformChange
646 )); 645 ));
647 } 646 }
648 647
649 SetupObjectObserve(); 648 SetupObjectObserve();
OLDNEW
« no previous file with comments | « src/execution.cc ('k') | src/promise.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698