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

Commit

Permalink
fix benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelw committed Mar 14, 2014
1 parent 4d5c9e1 commit d7050c2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
8 changes: 1 addition & 7 deletions benchmark/d8_benchmarks.js
Expand Up @@ -12,13 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

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

var console = {
log: print
Expand Down
11 changes: 9 additions & 2 deletions src/observe.js
Expand Up @@ -621,7 +621,14 @@

var runningMicrotaskCheckpoint = false;

var hasDebugForceFullDelivery = typeof Object.deliverAllChangeRecords == 'function';
var hasDebugForceFullDelivery = hasObserve && (function() {
try {
eval('%RunMicrotasks()');
return true;
} catch (ex) {
return false;
}
})();

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

Expand All @@ -630,7 +637,7 @@
return;

if (hasDebugForceFullDelivery) {
Object.deliverAllChangeRecords();
eval('%RunMicrotasks()');
return;
}

Expand Down

0 comments on commit d7050c2

Please sign in to comment.