From a7038bc15afb38421fd19868e5e7b17c6ac0dba4 Mon Sep 17 00:00:00 2001 From: sammc Date: Fri, 26 Sep 2014 06:35:13 -0700 Subject: Fix a leak in extensions_unittests. BUG=406487,416665 Review URL: https://codereview.chromium.org/603243004 Cr-Commit-Position: refs/heads/master@{#296931} --- extensions/test/data/unit_test_environment_specific_bindings.js | 7 +++---- 1 file 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, ' ')); }); }); -- cgit v1.1