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

Side by Side Diff: gin/arguments.cc

Issue 401823002: Added IsConstructorCall to gin::Arguments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unit tests Created 6 years, 5 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
« no previous file with comments | « gin/arguments.h ('k') | gin/wrappable_unittest.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 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) const { 43 void Arguments::ThrowTypeError(const std::string& message) const {
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 bool Arguments::IsConstructCall() const {
49 return info_->IsConstructCall();
50 }
51
48 } // namespace gin 52 } // namespace gin
OLDNEW
« no previous file with comments | « gin/arguments.h ('k') | gin/wrappable_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698