| Index: extensions/renderer/resources/event.js
|
| diff --git a/extensions/renderer/resources/event.js b/extensions/renderer/resources/event.js
|
| index f62ab0ff21752e49a378396905b48c2d51bf2d98..bb71297fb01188cd6d808190ce4bb98511ece7e2 100644
|
| --- a/extensions/renderer/resources/event.js
|
| +++ b/extensions/renderer/resources/event.js
|
| @@ -9,7 +9,6 @@
|
| var sendRequest = require('sendRequest').sendRequest;
|
| var utils = require('utils');
|
| var validate = require('schemaUtils').validate;
|
| - var unloadEvent = require('unload_event');
|
|
|
| // Schemas for the rule-style functions on the events API that
|
| // only need to be generated occasionally, so populate them lazily.
|
| @@ -38,9 +37,6 @@
|
| // A map of event names to the event object that is registered to that name.
|
| var attachedNamedEvents = {};
|
|
|
| - // An array of all attached event objects, used for detaching on unload.
|
| - var allAttachedEvents = [];
|
| -
|
| // A map of functions that massage event arguments before they are dispatched.
|
| // Key is event name, value is function.
|
| var eventArgumentMassagers = {};
|
| @@ -283,7 +279,6 @@
|
| this.attachmentStrategy.onAddedListener(listener);
|
|
|
| if (this.listeners.length == 0) {
|
| - allAttachedEvents[allAttachedEvents.length] = this;
|
| if (this.eventName) {
|
| if (attachedNamedEvents[this.eventName]) {
|
| throw new Error("Event '" + this.eventName +
|
| @@ -307,9 +302,6 @@
|
| this.attachmentStrategy.onRemovedListener(removedListener);
|
|
|
| if (this.listeners.length == 0) {
|
| - var i = $Array.indexOf(allAttachedEvents, this);
|
| - if (i >= 0)
|
| - delete allAttachedEvents[i];
|
| if (this.eventName) {
|
| if (!attachedNamedEvents[this.eventName]) {
|
| throw new Error(
|
| @@ -498,14 +490,6 @@
|
| ruleFunctionSchemas.getRules.parameters);
|
| }
|
|
|
| - unloadEvent.addListener(function() {
|
| - for (var i = 0; i < allAttachedEvents.length; ++i) {
|
| - var event = allAttachedEvents[i];
|
| - if (event)
|
| - event.detach_();
|
| - }
|
| - });
|
| -
|
| var Event = utils.expose('Event', EventImpl, { functions: [
|
| 'addListener',
|
| 'removeListener',
|
|
|