[Pkg-mozext-commits] [adblock-plus-element-hiding-helper] 21/28: Issue 5097, issue 5099 - Only retrieve element source from the process actually selecting

David Prévot taffit at moszumanska.debian.org
Fri Aug 4 21:15:16 UTC 2017


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository adblock-plus-element-hiding-helper.

commit b442fccb8c23f30c8fc3cff802623abe80161154
Author: Wladimir Palant <trev at adblockplus.org>
Date:   Tue Apr 4 19:59:56 2017 +0200

    Issue 5097, issue 5099 - Only retrieve element source from the process actually selecting
---
 lib/child/commands.js | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/child/commands.js b/lib/child/commands.js
index 952823b..f34fc0b 100644
--- a/lib/child/commands.js
+++ b/lib/child/commands.js
@@ -67,6 +67,9 @@ function serializeNode(node)
 
 function serializeSelected(message)
 {
+  if (!state.selectedElement)
+    return;
+
   messageManager.sendAsyncMessage("ElemHideHelper:Response", {
     messageId: message.data.messageId,
     serialized: serializeNode(state.selectedElement)
@@ -75,6 +78,9 @@ function serializeSelected(message)
 
 function getHTML(message)
 {
+  if (!state.selectedElement)
+    return;
+
   messageManager.sendAsyncMessage("ElemHideHelper:Response", {
     messageId: message.data.messageId,
     html: state.selectedElement.outerHTML,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus-element-hiding-helper.git



More information about the Pkg-mozext-commits mailing list