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

Side by Side Diff: gin/dictionary.cc

Issue 89723002: Convert the rest of the functions in core.cc to use CreateFunctionTemplate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase+comments Created 7 years 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 | « gin/dictionary.h ('k') | gin/function_template.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "gin/dictionary.h" 5 #include "gin/dictionary.h"
6 6
7 namespace gin { 7 namespace gin {
8 8
9 Dictionary::Dictionary(v8::Isolate* isolate) 9 Dictionary::Dictionary(v8::Isolate* isolate)
10 : isolate_(isolate) { 10 : isolate_(isolate) {
(...skipping 12 matching lines...) Expand all
23 Dictionary dictionary(isolate); 23 Dictionary dictionary(isolate);
24 dictionary.object_ = v8::Object::New(); 24 dictionary.object_ = v8::Object::New();
25 return dictionary; 25 return dictionary;
26 } 26 }
27 27
28 v8::Handle<v8::Value> Converter<Dictionary>::ToV8(v8::Isolate* isolate, 28 v8::Handle<v8::Value> Converter<Dictionary>::ToV8(v8::Isolate* isolate,
29 Dictionary val) { 29 Dictionary val) {
30 return val.object_; 30 return val.object_;
31 } 31 }
32 32
33 bool Converter<Dictionary>::FromV8(v8::Handle<v8::Value> val, 33 bool Converter<Dictionary>::FromV8(v8::Isolate* isolate,
34 v8::Handle<v8::Value> val,
34 Dictionary* out) { 35 Dictionary* out) {
35 if (!val->IsObject()) 36 if (!val->IsObject())
36 return false; 37 return false;
37 *out = Dictionary(out->isolate(), v8::Handle<v8::Object>::Cast(val)); 38 *out = Dictionary(isolate, v8::Handle<v8::Object>::Cast(val));
38 return true; 39 return true;
39 } 40 }
40 41
41 } // namespace gin 42 } // namespace gin
OLDNEW
« no previous file with comments | « gin/dictionary.h ('k') | gin/function_template.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698