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

Issue 7792011: Run LocalizeStrings() on plugin thread. (Closed)

Created:
9 years, 3 months ago by Lambros
Modified:
9 years, 3 months ago
CC:
chromium-reviews, jamiewalch+watch_chromium.org, hclam+watch_chromium.org, simonmorris+watch_chromium.org, wez+watch_chromium.org, dmaclach+watch_chromium.org, garykac+watch_chromium.org, lambroslambrou+watch_chromium.org, ajwong+watch_chromium.org, sergeyu+watch_chromium.org
Visibility:
Public.

Description

Run LocalizeStrings() on plugin thread. BUG=94135 TEST=Manual Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=98831

Patch Set 1 #

Patch Set 2 : Add DCHECK for running LocalizeStrings() on correct thread. #

Total comments: 12

Patch Set 3 : Fixes from review. #

Patch Set 4 : Remove attribute and add localize() method. #

Total comments: 4

Patch Set 5 : Pass localize_func as parameter. #

Total comments: 10

Patch Set 6 : Fix various nits. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -37 lines) Patch
M remoting/host/plugin/host_plugin_utils.h View 1 2 3 4 1 chunk +1 line, -0 lines 1 comment Download
M remoting/host/plugin/host_plugin_utils.cc View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M remoting/host/plugin/host_script_object.h View 1 2 3 4 5 6 chunks +14 lines, -3 lines 0 comments Download
M remoting/host/plugin/host_script_object.cc View 1 2 3 4 5 13 chunks +47 lines, -33 lines 2 comments Download
M remoting/webapp/me2mom/remoting.js View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 23 (0 generated)
Lambros
9 years, 3 months ago (2011-08-29 20:30:15 UTC) #1
Jamie
http://codereview.chromium.org/7792011/diff/2001/remoting/host/plugin/host_script_object.cc File remoting/host/plugin/host_script_object.cc (right): http://codereview.chromium.org/7792011/diff/2001/remoting/host/plugin/host_script_object.cc#newcode652 remoting/host/plugin/host_script_object.cc:652: DCHECK(plugin_message_loop_proxy_->BelongsToCurrentThread()); Other similar checks in the same file use ...
9 years, 3 months ago (2011-08-29 20:59:21 UTC) #2
Lambros
http://codereview.chromium.org/7792011/diff/2001/remoting/host/plugin/host_script_object.cc File remoting/host/plugin/host_script_object.cc (right): http://codereview.chromium.org/7792011/diff/2001/remoting/host/plugin/host_script_object.cc#newcode652 remoting/host/plugin/host_script_object.cc:652: DCHECK(plugin_message_loop_proxy_->BelongsToCurrentThread()); On 2011/08/29 20:59:22, Jamie wrote: > Other similar ...
9 years, 3 months ago (2011-08-29 21:21:42 UTC) #3
Sergey Ulanov
http://codereview.chromium.org/7792011/diff/2001/remoting/host/plugin/host_script_object.cc File remoting/host/plugin/host_script_object.cc (right): http://codereview.chromium.org/7792011/diff/2001/remoting/host/plugin/host_script_object.cc#newcode279 remoting/host/plugin/host_script_object.cc:279: LocalizeStrings(); Can we call this from Connect()? JavaScript may ...
9 years, 3 months ago (2011-08-29 21:22:04 UTC) #4
Jamie
LGTM
9 years, 3 months ago (2011-08-29 21:25:10 UTC) #5
Jamie
http://codereview.chromium.org/7792011/diff/2001/remoting/host/plugin/host_script_object.cc File remoting/host/plugin/host_script_object.cc (right): http://codereview.chromium.org/7792011/diff/2001/remoting/host/plugin/host_script_object.cc#newcode279 remoting/host/plugin/host_script_object.cc:279: LocalizeStrings(); On 2011/08/29 21:22:05, sergeyu wrote: > Can we ...
9 years, 3 months ago (2011-08-29 21:50:46 UTC) #6
Sergey Ulanov
http://codereview.chromium.org/7792011/diff/2001/remoting/host/plugin/host_script_object.cc File remoting/host/plugin/host_script_object.cc (right): http://codereview.chromium.org/7792011/diff/2001/remoting/host/plugin/host_script_object.cc#newcode279 remoting/host/plugin/host_script_object.cc:279: LocalizeStrings(); On 2011/08/29 21:50:46, Jamie wrote: > On 2011/08/29 ...
9 years, 3 months ago (2011-08-29 22:28:07 UTC) #7
Sergey Ulanov
http://codereview.chromium.org/7792011/diff/2001/remoting/host/plugin/host_script_object.cc File remoting/host/plugin/host_script_object.cc (right): http://codereview.chromium.org/7792011/diff/2001/remoting/host/plugin/host_script_object.cc#newcode652 remoting/host/plugin/host_script_object.cc:652: DCHECK(plugin_message_loop_proxy_->BelongsToCurrentThread()); On 2011/08/29 21:21:42, Lambros wrote: > On 2011/08/29 ...
9 years, 3 months ago (2011-08-29 22:30:27 UTC) #8
Lambros
http://codereview.chromium.org/7792011/diff/2001/remoting/host/plugin/host_script_object.cc File remoting/host/plugin/host_script_object.cc (right): http://codereview.chromium.org/7792011/diff/2001/remoting/host/plugin/host_script_object.cc#newcode279 remoting/host/plugin/host_script_object.cc:279: LocalizeStrings(); On 2011/08/29 22:28:07, sergeyu wrote: > On 2011/08/29 ...
9 years, 3 months ago (2011-08-29 23:24:59 UTC) #9
Sergey Ulanov
LGTM when the comments are addressed. http://codereview.chromium.org/7792011/diff/7001/remoting/host/plugin/host_script_object.cc File remoting/host/plugin/host_script_object.cc (right): http://codereview.chromium.org/7792011/diff/7001/remoting/host/plugin/host_script_object.cc#newcode44 remoting/host/plugin/host_script_object.cc:44: // attribute Function ...
9 years, 3 months ago (2011-08-29 23:43:31 UTC) #10
Lambros
PTAL - I've added another constructor to ScopedRefNPObject. http://codereview.chromium.org/7792011/diff/7001/remoting/host/plugin/host_script_object.cc File remoting/host/plugin/host_script_object.cc (right): http://codereview.chromium.org/7792011/diff/7001/remoting/host/plugin/host_script_object.cc#newcode44 remoting/host/plugin/host_script_object.cc:44: // ...
9 years, 3 months ago (2011-08-30 00:39:20 UTC) #11
Jamie
http://codereview.chromium.org/7792011/diff/7004/remoting/host/plugin/host_plugin_utils.cc File remoting/host/plugin/host_plugin_utils.cc (right): http://codereview.chromium.org/7792011/diff/7004/remoting/host/plugin/host_plugin_utils.cc#newcode50 remoting/host/plugin/host_plugin_utils.cc:50: When I write objects where the ctor and operator= ...
9 years, 3 months ago (2011-08-30 00:43:34 UTC) #12
Sergey Ulanov
http://codereview.chromium.org/7792011/diff/7004/remoting/host/plugin/host_plugin_utils.cc File remoting/host/plugin/host_plugin_utils.cc (right): http://codereview.chromium.org/7792011/diff/7004/remoting/host/plugin/host_plugin_utils.cc#newcode45 remoting/host/plugin/host_plugin_utils.cc:45: ScopedRefNPObject::ScopedRefNPObject(NPObject* object) : object_(object) { nit: move member initialization ...
9 years, 3 months ago (2011-08-30 00:53:08 UTC) #13
Jamie
http://codereview.chromium.org/7792011/diff/7004/remoting/host/plugin/host_plugin_utils.cc File remoting/host/plugin/host_plugin_utils.cc (right): http://codereview.chromium.org/7792011/diff/7004/remoting/host/plugin/host_plugin_utils.cc#newcode50 remoting/host/plugin/host_plugin_utils.cc:50: On 2011/08/30 00:53:08, sergeyu wrote: > On 2011/08/30 00:43:34, ...
9 years, 3 months ago (2011-08-30 00:57:55 UTC) #14
Lambros
http://codereview.chromium.org/7792011/diff/7004/remoting/host/plugin/host_plugin_utils.cc File remoting/host/plugin/host_plugin_utils.cc (right): http://codereview.chromium.org/7792011/diff/7004/remoting/host/plugin/host_plugin_utils.cc#newcode45 remoting/host/plugin/host_plugin_utils.cc:45: ScopedRefNPObject::ScopedRefNPObject(NPObject* object) : object_(object) { On 2011/08/30 00:53:08, sergeyu ...
9 years, 3 months ago (2011-08-30 01:49:25 UTC) #15
Sergey Ulanov
LGTM http://codereview.chromium.org/7792011/diff/5005/remoting/host/plugin/host_plugin_utils.h File remoting/host/plugin/host_plugin_utils.h (right): http://codereview.chromium.org/7792011/diff/5005/remoting/host/plugin/host_plugin_utils.h#newcode38 remoting/host/plugin/host_plugin_utils.h:38: explicit ScopedRefNPObject(NPObject* object); Do we still need this ...
9 years, 3 months ago (2011-08-30 02:30:16 UTC) #16
Lambros
On 2011/08/30 02:30:16, sergeyu wrote: > LGTM > > http://codereview.chromium.org/7792011/diff/5005/remoting/host/plugin/host_plugin_utils.h > File remoting/host/plugin/host_plugin_utils.h (right): > ...
9 years, 3 months ago (2011-08-30 15:43:13 UTC) #17
Sergey Ulanov
http://codereview.chromium.org/7792011/diff/5005/remoting/host/plugin/host_script_object.cc File remoting/host/plugin/host_script_object.cc (right): http://codereview.chromium.org/7792011/diff/5005/remoting/host/plugin/host_script_object.cc#newcode509 remoting/host/plugin/host_script_object.cc:509: ScopedRefNPObject localize_func(NPVARIANT_TO_OBJECT(args[0])); Why does this need to be ScopedRefNPObject? ...
9 years, 3 months ago (2011-08-30 16:39:26 UTC) #18
Lambros
On 2011/08/30 16:39:26, sergeyu wrote: > http://codereview.chromium.org/7792011/diff/5005/remoting/host/plugin/host_script_object.cc > File remoting/host/plugin/host_script_object.cc (right): > > http://codereview.chromium.org/7792011/diff/5005/remoting/host/plugin/host_script_object.cc#newcode509 > ...
9 years, 3 months ago (2011-08-30 16:49:03 UTC) #19
commit-bot: I haz the power
Change committed as 98831
9 years, 3 months ago (2011-08-30 17:00:18 UTC) #20
Wez
http://codereview.chromium.org/7792011/diff/5005/remoting/host/plugin/host_script_object.cc File remoting/host/plugin/host_script_object.cc (right): http://codereview.chromium.org/7792011/diff/5005/remoting/host/plugin/host_script_object.cc#newcode509 remoting/host/plugin/host_script_object.cc:509: ScopedRefNPObject localize_func(NPVARIANT_TO_OBJECT(args[0])); On 2011/08/30 16:39:26, sergeyu wrote: > Why ...
9 years, 3 months ago (2011-08-30 17:05:03 UTC) #21
Lambros
On Tue, Aug 30, 2011 at 10:05 AM, <wez@chromium.org> wrote: > > http://codereview.chromium.**org/7792011/diff/5005/** > remoting/host/plugin/host_**script_object.cc<http://codereview.chromium.org/7792011/diff/5005/remoting/host/plugin/host_script_object.cc> ...
9 years, 3 months ago (2011-08-30 17:08:16 UTC) #22
Wez
9 years, 3 months ago (2011-08-30 17:29:58 UTC) #23
On 2011/08/30 17:08:16, Lambros wrote:
> On Tue, Aug 30, 2011 at 10:05 AM, <mailto:wez@chromium.org> wrote:
> > Yes, this looks like it will cause a double-free when control returns to
> > the caller.
> 
> I don't think so.  The ctor addRefs, and the dtor releases.  So, using
> ScopedRefNPObject is unnecessary at worst.  Coming to a CL near you :)

You're quite right.  Panic over. ;)

Powered by Google App Engine
This is Rietveld 408576698