======================================================================== http://mondrian.corp.google.com/file/10487690///depot/googleclient/gears/opensource/gears/blob/blob.cc?a=2 File //depot/googleclient/gears/opensource/gears/blob/blob.cc (snapshot 2) ------------------------------------ Line 99: if (!context->GetArguments(ARRAYSIZE(argv), argv)) { On 8:33 am, michaeln wrote: > If the first param was also optional, getBytes() could yeild the entire blob as > a byte array... WDYT?
Done. This also makes blob.slice() return a blob that's equivalent to the original blob, which I suppose is all self-consistent. ------------------------------------ Line 109: int64 blob_size = contents_->Length(); On 8:44 am, michaeln wrote: > I think Length() can return -1 in error conditions, maybe test for that here. Done. ------------------------------------ Line 138: scoped_ptr<JsArray> js_array(module_environment_->js_runner_->NewArray()); On 8:40 am, michaeln wrote: > We are forever plagued with problems when invoking multiple script callbacks in > sequence. Since we're calling these back from within a script invoked native > method, i think we're generally in better shape than in the case of timers or > other async events... but... > > Maybe this->addref prior to making this series of callbacks and releasing when > done I'm confused -- by "this->addref" do you mean "this" to be the GearsBlob, or the JsArray? Regardless, I don't see how adding a scoped reference_adder will help either case. We don't invoke script during this method, we're simply returning something (an array) back to script. ======================================================================== -- To respond, reply to this email or visit http://mondrian.corp.google.com/10487690
