Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Commit d7050c2

Browse files
committed
fix benchmarks
R=arv BUG= Review URL: https://codereview.appspot.com/76130043
1 parent 4d5c9e1 commit d7050c2

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

benchmark/d8_benchmarks.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
/*
16-
This is a harness so that the ChangeSummary benchmarks can be run and profiled
17-
using V8's d8 shell. Doing requires modifying V8's src/object-observe.js to
18-
expose full delivery of all pending changes to observers via
19-
Object.deliverAllChangesRecords(). This is *not* a part of the spec and is
20-
just a hack to allow profiling the benchmarks from d8.
21-
*/
15+
// Flags: --allow-natives-syntax
2216

2317
var console = {
2418
log: print

src/observe.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,14 @@
621621

622622
var runningMicrotaskCheckpoint = false;
623623

624-
var hasDebugForceFullDelivery = typeof Object.deliverAllChangeRecords == 'function';
624+
var hasDebugForceFullDelivery = hasObserve && (function() {
625+
try {
626+
eval('%RunMicrotasks()');
627+
return true;
628+
} catch (ex) {
629+
return false;
630+
}
631+
})();
625632

626633
global.Platform = global.Platform || {};
627634

@@ -630,7 +637,7 @@
630637
return;
631638

632639
if (hasDebugForceFullDelivery) {
633-
Object.deliverAllChangeRecords();
640+
eval('%RunMicrotasks()');
634641
return;
635642
}
636643

0 commit comments

Comments
 (0)