|
From: <br...@us...> - 2010-02-06 03:47:47
|
Revision: 4077
http://openvrml.svn.sourceforge.net/openvrml/?rev=4077&view=rev
Author: braden
Date: 2010-02-06 03:47:40 +0000 (Sat, 06 Feb 2010)
Log Message:
-----------
Ensure that plugin_streambuf::set_get_url_result gets called if browser_host::get_url throws.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/local/libopenvrml-control/openvrml_control/browser.cpp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-02-04 03:00:35 UTC (rev 4076)
+++ trunk/ChangeLog 2010-02-06 03:47:40 UTC (rev 4077)
@@ -1,3 +1,10 @@
+2010-02-05 Braden McDaniel <br...@en...>
+
+ * src/local/libopenvrml-control/openvrml_control/browser.cpp
+ (openvrml_control::browser::resource_fetcher::do_get_resource(const
+ std::string &)): Ensure that plugin_streambuf::set_get_url_result
+ gets called if browser_host::get_url throws.
+
2010-02-03 Braden McDaniel <br...@en...>
* doc/Doxyfile: Suppress generation of the bug, todo, and test
Modified: trunk/src/local/libopenvrml-control/openvrml_control/browser.cpp
===================================================================
--- trunk/src/local/libopenvrml-control/openvrml_control/browser.cpp 2010-02-04 03:00:35 UTC (rev 4076)
+++ trunk/src/local/libopenvrml-control/openvrml_control/browser.cpp 2010-02-06 03:47:40 UTC (rev 4077)
@@ -527,9 +527,17 @@
uri, this->streambuf_);
//
- // browser_host::get_url could throw; let it.
+ // If browser_host::get_url throws, we need to make sure that
+ // plugin_streambuf::set_get_url_result gets called. Otherwise,
+ // plugin_streambuf::init will block indefinitely.
//
- const int get_url_result = fetcher.control_host_.get_url(uri);
+ int get_url_result;
+ try {
+ get_url_result = fetcher.control_host_.get_url(uri);
+ } catch (...) {
+ this->streambuf_->set_get_url_result(-1);
+ throw;
+ }
if (get_url_result != 0) {
this->setstate(ios_base::badbit);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|