Hello zork,

I'd like you to do a code review.  Please execute
        g4 diff -c 9631969

or point your web browser to
        http://mondrian/9631969

to review the following code:

Change 9631969 by micha...@michaeln-scour2 on 2009/01/07 12:53:35 *pending*

        Fix for a high ranking crashing bug in JsRunnerImpl::~JsRunnerImpl()
        
        R=zork
        [email protected]
        DELTA=8  (4 added, 0 deleted, 4 changed)
        OCL=9631969

Affected files ...

... //depot/googleclient/gears/opensource/gears/base/common/js_runner_ie.cc#25 
edit

8 delta lines: 4 added, 0 deleted, 4 changed

Also consider running:
        g4 lint -c 9631969

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 9631969 by micha...@michaeln-scour2 on 2009/01/07 12:53:35 *pending*

        Fix for a high ranking crashing bug in JsRunnerImpl::~JsRunnerImpl()

Affected files ...

... //depot/googleclient/gears/opensource/gears/base/common/js_runner_ie.cc#25 
edit

==== //depot/googleclient/gears/opensource/gears/base/common/js_runner_ie.cc#25 
- 
C:\p4\michaeln-scour2/googleclient/gears/opensource/gears/base/common/js_runner_ie.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/base/common/js_runner_ie.cc     
2009-01-07 12:58:15.000000000 -0800
+++ googleclient/gears/opensource/gears/base/common/js_runner_ie.cc     
2009-01-07 12:43:26.000000000 -0800
@@ -723,14 +723,18 @@
 
 STDMETHODIMP JsRunnerImpl::LookupNamedItem(const OLECHAR *name,
                                            IUnknown **item) {
-  IUnknown *found_item = global_name_to_object_[name];
-  if (!found_item) { return TYPE_E_ELEMENTNOTFOUND; }
+  NameToObjectMap::const_iterator found = 
+      global_name_to_object_.find(std::string16(name));
+  if (found == global_name_to_object_.end()) {
+    return TYPE_E_ELEMENTNOTFOUND;
+  }
+  assert(found->second);
 
   // IActiveScript expects items coming into it to already be AddRef()'d. It
   // will Release() these references on IActiveScript.Close().
   // For an example of this, see: http://support.microsoft.com/kb/q221992/.
-  found_item->AddRef();
-  *item = found_item;
+  found->second->AddRef();
+  *item = found->second;
   return S_OK;
 }
 

Reply via email to