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

Side by Side Diff: gin/arguments.cc

Issue 103703002: Gin: Add support for binding JS methods to C++ instance methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again 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
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/arguments.h" 5 #include "gin/arguments.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "gin/converter.h" 8 #include "gin/converter.h"
9 9
10 namespace gin { 10 namespace gin {
(...skipping 27 matching lines...) Expand all
38 38
39 ThrowTypeError(base::StringPrintf( 39 ThrowTypeError(base::StringPrintf(
40 "Error processing argument %d.", next_ - 1)); 40 "Error processing argument %d.", next_ - 1));
41 } 41 }
42 42
43 void Arguments::ThrowTypeError(const std::string& message) { 43 void Arguments::ThrowTypeError(const std::string& message) {
44 isolate_->ThrowException(v8::Exception::TypeError( 44 isolate_->ThrowException(v8::Exception::TypeError(
45 StringToV8(isolate_, message))); 45 StringToV8(isolate_, message)));
46 } 46 }
47 47
48 template<>
49 bool Arguments::GetNext<Arguments>(Arguments* out) {
50 *out = *this;
51 return true;
52 }
53
54 } // namespace gin 48 } // namespace gin
OLDNEW
« no previous file with comments | « gin/arguments.h ('k') | gin/function_template.h » ('j') | gin/object_template_builder.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698