Skip to content

Commit

Permalink
Work-around for Safari JIT bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dgreensp committed Aug 17, 2014
1 parent 8a262ad commit e897539
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/blaze/events.js
Expand Up @@ -120,6 +120,13 @@ HandlerRec.prototype.unbind = function () {

EventSupport.listen = function (element, events, selector, handler, recipient, getParentRecipient) {

// Prevent this method from being JITed by Safari. Due to a
// presumed JIT bug in Safari -- observed in Version 7.0.6
// (9537.78.2) -- this method may crash the Safari render process if
// it is JITed.
// Repro: https://github.com/dgreensp/public/tree/master/safari-crash
try { element = element; } finally {}

var eventTypes = [];
events.replace(/[^ /]+/g, function (e) {
eventTypes.push(e);
Expand Down

2 comments on commit e897539

@avital
Copy link
Contributor

@avital avital commented on e897539 Aug 17, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

woah

@gschmidt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hardcore!

Please sign in to comment.