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

Side by Side Diff: ppapi/shared_impl/scoped_pp_var.cc

Issue 12387073: Add PPB_VarDictionary_Dev support - part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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
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/shared_impl/scoped_pp_var.h" 5 #include "ppapi/shared_impl/scoped_pp_var.h"
6 6
7 #include "ppapi/shared_impl/ppapi_globals.h" 7 #include "ppapi/shared_impl/ppapi_globals.h"
8 #include "ppapi/shared_impl/var_tracker.h" 8 #include "ppapi/shared_impl/var_tracker.h"
9 9
10 namespace ppapi { 10 namespace ppapi {
(...skipping 29 matching lines...) Expand all
40 CallRelease(var_); 40 CallRelease(var_);
41 } 41 }
42 42
43 ScopedPPVar& ScopedPPVar::operator=(const PP_Var& v) { 43 ScopedPPVar& ScopedPPVar::operator=(const PP_Var& v) {
44 CallAddRef(v); 44 CallAddRef(v);
45 CallRelease(var_); 45 CallRelease(var_);
46 var_ = v; 46 var_ = v;
47 return *this; 47 return *this;
48 } 48 }
49 49
50 PP_Var ScopedPPVar::Release() {
51 PP_Var result = var_;
52 var_ = PP_MakeUndefined();
53 return result;
54 }
55
50 } // namespace ppapi 56 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698