Index: extensions/renderer/resources/display_source_custom_bindings.js |
diff --git a/extensions/renderer/resources/display_source_custom_bindings.js b/extensions/renderer/resources/display_source_custom_bindings.js |
index a1345ff1a534b8a260fedc8effedfecbaece75dc..38d7e3c791e3e7fa2f9a432aaedacd55cae4518a 100644 |
--- a/extensions/renderer/resources/display_source_custom_bindings.js |
+++ b/extensions/renderer/resources/display_source_custom_bindings.js |
@@ -18,7 +18,7 @@ function callbackWrapper(callback, method, message) { |
try { |
if (message !== null) |
- lastError.set('displaySource.startSession', message, null, chrome); |
+ lastError.set(method, message, null, chrome); |
callback(); |
} finally { |
lastError.clear(chrome); |
@@ -40,7 +40,7 @@ binding.registerCustomHook(function(bindingsAPI, extensionId) { |
apiFunctions.setHandleRequest( |
'startSession', function(sessionInfo, callback) { |
try { |
- var callId = natives.StartSession(sessionInfo, callbackWrapper); |
+ var callId = natives.StartSession(sessionInfo); |
callbacksInfo[callId] = { |
callback: callback, |
method: 'displaySource.startSession' |
@@ -52,7 +52,7 @@ binding.registerCustomHook(function(bindingsAPI, extensionId) { |
apiFunctions.setHandleRequest( |
'terminateSession', function(sink_id, callback) { |
try { |
- var callId = natives.TerminateSession(sink_id, callbackWrapper); |
+ var callId = natives.TerminateSession(sink_id); |
callbacksInfo[callId] = { |
callback: callback, |
method: 'displaySource.terminateSession' |