Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Unified Diff: src/trusted/plugin/srpc/srpc.cc

Issue 1092005: Issue 1092005 (Closed) Base URL: http://nativeclient.googlecode.com/svn/trunk/src/native_client/
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/trusted/plugin/srpc/srpc.cc
===================================================================
--- src/trusted/plugin/srpc/srpc.cc (revision 1695)
+++ src/trusted/plugin/srpc/srpc.cc (working copy)
@@ -355,7 +355,7 @@
if (NULL == stream->notifyData) {
// Closures are handled in URLNotify (this is the only way to know
// the stream is completed since not all streams have a valid "end" value
- // Here we handle only the default, src=... streams (statically obtained)
+ // Here we handle only the default, nexe=... streams (statically obtained)
if (static_cast<int32_t>(stream->end) == offset + len) {
// Stream downloaded - go ahead
dprintf(("default run\n"));
@@ -389,7 +389,7 @@
if (NULL != closure) {
closure->Run(stream, fname);
} else {
- // default, src=... statically obtained
+ // default, nexe=... statically obtained
dprintf(("default run\n"));
nacl_srpc::Plugin* real_plugin =
static_cast<nacl_srpc::Plugin*>(plugin_->get_handle());
@@ -415,6 +415,10 @@
nacl_srpc::Closure* closure
= static_cast<nacl_srpc::Closure*>(notifyData);
+ // FIXME(adonovan): this looks fishy! closure is maybe-null in the
+ // false branch, but assumed non-null in the true branch... yet the
+ // branch condition is not under our control.
sehr (please use chromium) 2010/04/07 03:57:39 I fear this code has changed somewhat due Bennet's
+
if (NPRES_DONE == reason) {
dprintf(("URLNotify: '%s', rsn NPRES_DONE (%d)\n", url, reason));
StreamBuffer* stream_buffer = closure->buffer();
@@ -431,6 +435,11 @@
if (NULL != closure) {
closure->Run(NULL, NULL);
} else {
+ // FIXME(adonovan): I don't understand how this can work.
+ // RunOnfailHandler's docstring says "to indicate unsuccessful
+ // loading of a module", but if we're loading a module, then
+ // |closure| is an instance of LoadNaClAppNotify, so it's
+ // non-NULL, and the other branch of the if-statement is taken.
bsy 2010/03/23 21:20:37 plz verify w/ sehr, but i think this distinction i
sehr (please use chromium) 2010/03/23 21:37:16 Bennet got this right. We use the same code to do
adonovan 2010/03/25 00:44:05 Regarding the onfail handler, I can't actually fin
sehr (please use chromium) 2010/04/07 03:57:39 I think this block is because of (3) above. But y
plugin()->get_handle()->GetPortablePluginInterface()->RunOnfailHandler(
GetPluginIdentifier());
}

Powered by Google App Engine
This is Rietveld 408576698