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

Side by Side Diff: chrome/plugin/npobject_proxy.cc

Issue 375005: When a plugin calls NPN_SetException, pass the exception along to every rende... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/plugin/npobject_proxy.h ('k') | chrome/plugin/npobject_stub.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/plugin/npobject_proxy.h" 5 #include "chrome/plugin/npobject_proxy.h"
6 6
7 #include "chrome/common/plugin_messages.h" 7 #include "chrome/common/plugin_messages.h"
8 #include "chrome/plugin/npobject_util.h" 8 #include "chrome/plugin/npobject_util.h"
9 #include "chrome/plugin/plugin_channel.h" 9 #include "chrome/plugin/plugin_channel.h"
10 #include "third_party/WebKit/WebKit/chromium/public/WebBindings.h" 10 #include "third_party/WebKit/WebKit/chromium/public/WebBindings.h"
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 proxy->Send(msg); 477 proxy->Send(msg);
478 // Send may delete proxy. 478 // Send may delete proxy.
479 proxy = NULL; 479 proxy = NULL;
480 if (!result) 480 if (!result)
481 return false; 481 return false;
482 482
483 CreateNPVariant( 483 CreateNPVariant(
484 result_param, channel.get(), result_var, containing_window, page_url); 484 result_param, channel.get(), result_var, containing_window, page_url);
485 return true; 485 return true;
486 } 486 }
487
488 void NPObjectProxy::NPNSetException(NPObject *obj,
489 const NPUTF8 *message) {
490 NPObjectProxy* proxy = GetProxy(obj);
491 if (!proxy) {
492 return;
493 }
494
495 NPVariant_Param result_param;
496 std::string message_str(message);
497
498 proxy->Send(new NPObjectMsg_SetException(proxy->route_id(), message_str));
499 // Send may delete proxy.
500 proxy = NULL;
501 }
OLDNEW
« no previous file with comments | « chrome/plugin/npobject_proxy.h ('k') | chrome/plugin/npobject_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698