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

Side by Side Diff: include/v8.h

Issue 6902108: Implement CallAsConstructor method for Object in the API (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add missing testcase Created 9 years, 7 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 | src/api.cc » ('j') | src/api.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1596 matching lines...) Expand 10 before | Expand all | Expand 10 after
1607 V8EXPORT int GetIndexedPropertiesExternalArrayDataLength(); 1607 V8EXPORT int GetIndexedPropertiesExternalArrayDataLength();
1608 1608
1609 /** 1609 /**
1610 * Call an Object as a function if a callback is set by the 1610 * Call an Object as a function if a callback is set by the
1611 * ObjectTemplate::SetCallAsFunctionHandler method. 1611 * ObjectTemplate::SetCallAsFunctionHandler method.
1612 */ 1612 */
1613 V8EXPORT Local<Value> CallAsFunction(Handle<Object> recv, 1613 V8EXPORT Local<Value> CallAsFunction(Handle<Object> recv,
1614 int argc, 1614 int argc,
1615 Handle<Value> argv[]); 1615 Handle<Value> argv[]);
1616 1616
1617 /**
1618 * Call an Object as a consturctor if a callback is set by the
1619 * ObjectTemplate::SetCallAsFunctionHandler method.
1620 * Note: This method behaves like the Function::NewInstance method.
1621 */
1622 V8EXPORT Local<Value> CallAsConstructor(int argc,
1623 Handle<Value> argv[]);
1624
1617 V8EXPORT static Local<Object> New(); 1625 V8EXPORT static Local<Object> New();
1618 static inline Object* Cast(Value* obj); 1626 static inline Object* Cast(Value* obj);
1619 private: 1627 private:
1620 V8EXPORT Object(); 1628 V8EXPORT Object();
1621 V8EXPORT static void CheckCast(Value* obj); 1629 V8EXPORT static void CheckCast(Value* obj);
1622 V8EXPORT Local<Value> CheckedGetInternalField(int index); 1630 V8EXPORT Local<Value> CheckedGetInternalField(int index);
1623 V8EXPORT void* SlowGetPointerFromInternalField(int index); 1631 V8EXPORT void* SlowGetPointerFromInternalField(int index);
1624 1632
1625 /** 1633 /**
1626 * If quick access to the internal field is possible this method 1634 * If quick access to the internal field is possible this method
(...skipping 2436 matching lines...) Expand 10 before | Expand all | Expand 10 after
4063 4071
4064 4072
4065 } // namespace v8 4073 } // namespace v8
4066 4074
4067 4075
4068 #undef V8EXPORT 4076 #undef V8EXPORT
4069 #undef TYPE_CHECK 4077 #undef TYPE_CHECK
4070 4078
4071 4079
4072 #endif // V8_H_ 4080 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698