Skip to content

Commit

Permalink
Fix exception when webpage.close() is called twice at the same time
Browse files Browse the repository at this point in the history
Refs #237
  • Loading branch information
laurentj committed Oct 14, 2014
1 parent 8015d76 commit 005bde7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Improvements
Fixed bugs
----------

* Two calls of webpage.close() may trigger an exception.
* Webserver: request.post was not filled correctly (not an object) when the
content is application/x-www-form-urlencoded (#228)
* Cookies: cookies set with ``phantom`` or ``webpage`` were not visible by default
Expand Down
4 changes: 3 additions & 1 deletion src/modules/slimer-sdk/webpage.js
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,9 @@ function _create(parentWebpageInfo) {
try {
Services.console.unregisterListener(jsErrorListener);
}catch(e){}
Services.obs.removeObserver(webpageObserver, "console-api-log-event");
try {
Services.obs.removeObserver(webpageObserver, "console-api-log-event");
}catch(e){}
netLog.unregisterBrowser(browser);
this.closing(this);
slLauncher.closeBrowser(browser);
Expand Down

0 comments on commit 005bde7

Please sign in to comment.