summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsammc <sammc@chromium.org>2014-09-26 06:35:13 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-26 13:35:24 +0000
commita7038bc15afb38421fd19868e5e7b17c6ac0dba4 (patch)
treec4e28e432926ab87e6a44030e7562ad79e0e3a2b
parent3bcb9aff8490f023b55b3c0af6157da9f8443ca1 (diff)
downloadchromium_src-a7038bc15afb38421fd19868e5e7b17c6ac0dba4.zip
chromium_src-a7038bc15afb38421fd19868e5e7b17c6ac0dba4.tar.gz
chromium_src-a7038bc15afb38421fd19868e5e7b17c6ac0dba4.tar.bz2
Fix a leak in extensions_unittests.
BUG=406487,416665 Review URL: https://codereview.chromium.org/603243004 Cr-Commit-Position: refs/heads/master@{#296931}
-rw-r--r--extensions/test/data/unit_test_environment_specific_bindings.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/extensions/test/data/unit_test_environment_specific_bindings.js b/extensions/test/data/unit_test_environment_specific_bindings.js
index 3636ec7..2fbcc3e 100644
--- a/extensions/test/data/unit_test_environment_specific_bindings.js
+++ b/extensions/test/data/unit_test_environment_specific_bindings.js
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-var nativesPromise = requireAsync('testNatives');
var sendRequestNatives = requireNative('sendRequest');
function registerHooks(api) {
@@ -10,19 +9,19 @@ function registerHooks(api) {
var apiFunctions = api.apiFunctions;
apiFunctions.setHandleRequest('notifyPass', function() {
- nativesPromise.then(function(natives) {
+ requireAsync('testNatives').then(function(natives) {
natives.NotifyPass();
});
});
apiFunctions.setHandleRequest('notifyFail', function(message) {
- nativesPromise.then(function(natives) {
+ requireAsync('testNatives').then(function(natives) {
natives.NotifyFail(message);
});
});
apiFunctions.setHandleRequest('log', function() {
- nativesPromise.then(function(natives) {
+ requireAsync('testNatives').then(function(natives) {
natives.Log($Array.join(arguments, ' '));
});
});