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

Side by Side Diff: ppapi/proxy/serialized_var.cc

Issue 197203004: Fix "unreachable code" warnings (MSVC warning 4702) in ppapi/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 9 months 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 | « no previous file | ppapi/tests/test_file_mapping.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ppapi/proxy/serialized_var.h" 5 #include "ppapi/proxy/serialized_var.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ipc/ipc_message_utils.h" 8 #include "ipc/ipc_message_utils.h"
9 #include "ppapi/c/pp_instance.h" 9 #include "ppapi/c/pp_instance.h"
10 #include "ppapi/proxy/dispatcher.h" 10 #include "ppapi/proxy/dispatcher.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 break; 61 break;
62 } 62 }
63 } 63 }
64 64
65 PP_Var SerializedVar::Inner::GetVar() { 65 PP_Var SerializedVar::Inner::GetVar() {
66 DCHECK(serialization_rules_.get()); 66 DCHECK(serialization_rules_.get());
67 67
68 #if defined(NACL_WIN64) 68 #if defined(NACL_WIN64)
69 NOTREACHED(); 69 NOTREACHED();
70 return PP_MakeUndefined(); 70 return PP_MakeUndefined();
71 #endif 71 #else
72
73 if (raw_var_data_.get()) { 72 if (raw_var_data_.get()) {
74 var_ = raw_var_data_->CreatePPVar(instance_); 73 var_ = raw_var_data_->CreatePPVar(instance_);
75 raw_var_data_.reset(NULL); 74 raw_var_data_.reset(NULL);
76 } 75 }
77 76
78 return var_; 77 return var_;
78 #endif
79 } 79 }
80 80
81 void SerializedVar::Inner::SetVar(PP_Var var) { 81 void SerializedVar::Inner::SetVar(PP_Var var) {
82 // Sanity check, when updating the var we should have received a 82 // Sanity check, when updating the var we should have received a
83 // serialization rules pointer already. 83 // serialization rules pointer already.
84 DCHECK(serialization_rules_.get()); 84 DCHECK(serialization_rules_.get());
85 var_ = var; 85 var_ = var;
86 raw_var_data_.reset(NULL); 86 raw_var_data_.reset(NULL);
87 } 87 }
88 88
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 const std::string& str) { 458 const std::string& str) {
459 inner_->ForceSetVarValueForTest(StringVar::StringToPPVar(str)); 459 inner_->ForceSetVarValueForTest(StringVar::StringToPPVar(str));
460 } 460 }
461 461
462 SerializedVarTestReader::SerializedVarTestReader(const SerializedVar& var) 462 SerializedVarTestReader::SerializedVarTestReader(const SerializedVar& var)
463 : SerializedVar(var) { 463 : SerializedVar(var) {
464 } 464 }
465 465
466 } // namespace proxy 466 } // namespace proxy
467 } // namespace ppapi 467 } // namespace ppapi
OLDNEW
« no previous file with comments | « no previous file | ppapi/tests/test_file_mapping.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698