Commit a7038bc1 authored by sammc's avatar sammc Committed by Commit bot

Fix a leak in extensions_unittests.

BUG=406487,416665

Review URL: https://codereview.chromium.org/603243004

Cr-Commit-Position: refs/heads/master@{#296931}
parent 3bcb9aff
......@@ -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, ' '));
});
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment