Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: background.js

Issue 6471196916842496: Issue 1840 - Fixed memory leak caused by "forward" messages (Closed)
Patch Set: Created Jan. 21, 2015, 7:20 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | block.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: background.js
===================================================================
--- a/background.js
+++ b/background.js
@@ -560,10 +560,13 @@
case "forward":
if (sender.page)
{
- sender.page.sendMessage(msg.payload, sendResponse);
- // Return true to indicate that we want to call
- // sendResponse asynchronously
- return true;
+ if (msg.expectsResponse)
+ {
+ sender.page.sendMessage(msg.payload, sendResponse);
+ return true;
+ }
+
+ sender.page.sendMessage(msg.payload);
}
break;
}
« no previous file with comments | « no previous file | block.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld