Fix a crash related to PPAPI scripting.
SerializedVar and MessageChannel didn't properly handle the case that the dispatcher goes away while waiting for the reply to a sync message.
BUG=110095
TEST=When click the Test button on ppapi/example/example.html, the plugin is removed but the renderer doesn't crash.
Review URL: http://codereview.chromium.org/9655019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126014 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/ppapi/proxy/dispatcher.cc b/ppapi/proxy/dispatcher.cc
index 8ba7830b..a2a1d71 100644
--- a/ppapi/proxy/dispatcher.cc
+++ b/ppapi/proxy/dispatcher.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -70,7 +70,7 @@
void Dispatcher::SetSerializationRules(
VarSerializationRules* var_serialization_rules) {
- serialization_rules_.reset(var_serialization_rules);
+ serialization_rules_ = var_serialization_rules;
}
void Dispatcher::OnInvalidMessageReceived() {