Hello michaeln,
I'd like you to do a code review. Please execute
g4 diff -c 10007606
or point your web browser to
http://mondrian/10007606
to review the following code:
Change 10007606 by mpcompl...@mpcomplete-gears on 2009/02/04 16:48:23 *pending*
Attempt at fix for
http://code.google.com/p/chromium/issues/detail?id=7365 .
It looks like in Chrome, the GearsManagedResourceStore is being deleted
in the middle of OnNotify, thanks to some sync NPAPI call made in the middle.
Maybe addrefing it will help.
R=michaeln
[email protected]
DELTA=3 (3 added, 0 deleted, 0 changed)
OCL=10007606
Affected files ...
...
//depot/googleclient/gears/opensource/gears/localserver/managed_resource_store_module.cc#5
edit
3 delta lines: 3 added, 0 deleted, 0 changed
Also consider running:
g4 lint -c 10007606
which verifies that the changelist doesn't introduce new style violations.
If you can't do the review, please let me know as soon as possible. During
your review, please ensure that all new code has corresponding unit tests and
that existing unit tests are updated appropriately. Visit
http://www/eng/code_review.html for more information.
This is a semiautomated message from "g4 mail". Complaints or suggestions?
Mail [email protected].
Change 10007606 by mpcompl...@mpcomplete-gears on 2009/02/04 16:48:23 *pending*
Attempt at fix for
http://code.google.com/p/chromium/issues/detail?id=7365 .
It looks like in Chrome, the GearsManagedResourceStore is being deleted
in the middle of OnNotify, thanks to some sync NPAPI call made in the middle.
Maybe addrefing it will help.
Affected files ...
...
//depot/googleclient/gears/opensource/gears/localserver/managed_resource_store_module.cc#5
edit
====
//depot/googleclient/gears/opensource/gears/localserver/managed_resource_store_module.cc#5
-
C:\src\gears/googleclient/gears/opensource/gears/localserver/managed_resource_store_module.cc
====
# action=edit type=text
---
googleclient/gears/opensource/gears/localserver/managed_resource_store_module.cc
2009-02-04 16:48:33.000000000 -0800
+++
googleclient/gears/opensource/gears/localserver/managed_resource_store_module.cc
2009-02-04 16:24:17.000000000 -0800
@@ -312,6 +312,9 @@
void GearsManagedResourceStore::OnNotify(MessageService *service,
const char16 *topic,
const NotificationData *data) {
+ // Keep a ref to ourselves. Otherwise, calls to the JsRunner may end up
+ // deleting us.
+ scoped_refptr<GearsManagedResourceStore> hold(this);
scoped_ptr<JsObject> param;
JsRootedCallback *handler = 0;