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

Side by Side Diff: include/v8.h

Issue 9795004: Reverted merge of r10400 and r10499 into 3.7 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.7
Patch Set: Created 8 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
« no previous file with comments | « no previous file | src/api.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 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 1714 matching lines...) Expand 10 before | Expand all | Expand 10 after
1725 public: 1725 public:
1726 V8EXPORT Local<Object> NewInstance() const; 1726 V8EXPORT Local<Object> NewInstance() const;
1727 V8EXPORT Local<Object> NewInstance(int argc, Handle<Value> argv[]) const; 1727 V8EXPORT Local<Object> NewInstance(int argc, Handle<Value> argv[]) const;
1728 V8EXPORT Local<Value> Call(Handle<Object> recv, 1728 V8EXPORT Local<Value> Call(Handle<Object> recv,
1729 int argc, 1729 int argc,
1730 Handle<Value> argv[]); 1730 Handle<Value> argv[]);
1731 V8EXPORT void SetName(Handle<String> name); 1731 V8EXPORT void SetName(Handle<String> name);
1732 V8EXPORT Handle<Value> GetName() const; 1732 V8EXPORT Handle<Value> GetName() const;
1733 1733
1734 /** 1734 /**
1735 * Name inferred from variable or property assignment of this function.
1736 * Used to facilitate debugging and profiling of JavaScript code written
1737 * in an OO style, where many functions are anonymous but are assigned
1738 * to object properties.
1739 */
1740 V8EXPORT Handle<Value> GetInferredName() const;
1741
1742 /**
1743 * Returns zero based line number of function body and 1735 * Returns zero based line number of function body and
1744 * kLineOffsetNotFound if no information available. 1736 * kLineOffsetNotFound if no information available.
1745 */ 1737 */
1746 V8EXPORT int GetScriptLineNumber() const; 1738 V8EXPORT int GetScriptLineNumber() const;
1747 /** 1739 /**
1748 * Returns zero based column number of function body and 1740 * Returns zero based column number of function body and
1749 * kLineOffsetNotFound if no information available. 1741 * kLineOffsetNotFound if no information available.
1750 */ 1742 */
1751 V8EXPORT int GetScriptColumnNumber() const; 1743 V8EXPORT int GetScriptColumnNumber() const;
1752 V8EXPORT Handle<Value> GetScriptId() const; 1744 V8EXPORT Handle<Value> GetScriptId() const;
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after
2846 char** raw_data; 2838 char** raw_data;
2847 }; 2839 };
2848 2840
2849 2841
2850 /** 2842 /**
2851 * EntropySource is used as a callback function when v8 needs a source 2843 * EntropySource is used as a callback function when v8 needs a source
2852 * of entropy. 2844 * of entropy.
2853 */ 2845 */
2854 typedef bool (*EntropySource)(unsigned char* buffer, size_t length); 2846 typedef bool (*EntropySource)(unsigned char* buffer, size_t length);
2855 2847
2856
2857 /**
2858 * Interface for iterating though all external resources in the heap.
2859 */
2860 class V8EXPORT ExternalResourceVisitor { // NOLINT
2861 public:
2862 virtual ~ExternalResourceVisitor() {}
2863 virtual void VisitExternalString(Handle<String> string) {}
2864 };
2865
2866
2867 /** 2848 /**
2868 * Container class for static utility functions. 2849 * Container class for static utility functions.
2869 */ 2850 */
2870 class V8EXPORT V8 { 2851 class V8EXPORT V8 {
2871 public: 2852 public:
2872 /** Set the callback to invoke in case of fatal errors. */ 2853 /** Set the callback to invoke in case of fatal errors. */
2873 static void SetFatalErrorHandler(FatalErrorCallback that); 2854 static void SetFatalErrorHandler(FatalErrorCallback that);
2874 2855
2875 /** 2856 /**
2876 * Set the callback to invoke to check if code generation from 2857 * Set the callback to invoke to check if code generation from
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
3200 * to use if the process needs the resources taken up by v8. 3181 * to use if the process needs the resources taken up by v8.
3201 */ 3182 */
3202 static bool Dispose(); 3183 static bool Dispose();
3203 3184
3204 /** 3185 /**
3205 * Get statistics about the heap memory usage. 3186 * Get statistics about the heap memory usage.
3206 */ 3187 */
3207 static void GetHeapStatistics(HeapStatistics* heap_statistics); 3188 static void GetHeapStatistics(HeapStatistics* heap_statistics);
3208 3189
3209 /** 3190 /**
3210 * Iterates through all external resources referenced from current isolate
3211 * heap. This method is not expected to be used except for debugging purposes
3212 * and may be quite slow.
3213 */
3214 static void VisitExternalResources(ExternalResourceVisitor* visitor);
3215
3216 /**
3217 * Optional notification that the embedder is idle. 3191 * Optional notification that the embedder is idle.
3218 * V8 uses the notification to reduce memory footprint. 3192 * V8 uses the notification to reduce memory footprint.
3219 * This call can be used repeatedly if the embedder remains idle. 3193 * This call can be used repeatedly if the embedder remains idle.
3220 * Returns true if the embedder should stop calling IdleNotification 3194 * Returns true if the embedder should stop calling IdleNotification
3221 * until real work has been done. This indicates that V8 has done 3195 * until real work has been done. This indicates that V8 has done
3222 * as much cleanup as it will be able to do. 3196 * as much cleanup as it will be able to do.
3223 */ 3197 */
3224 static bool IdleNotification(); 3198 static bool IdleNotification();
3225 3199
3226 /** 3200 /**
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
4254 4228
4255 4229
4256 } // namespace v8 4230 } // namespace v8
4257 4231
4258 4232
4259 #undef V8EXPORT 4233 #undef V8EXPORT
4260 #undef TYPE_CHECK 4234 #undef TYPE_CHECK
4261 4235
4262 4236
4263 #endif // V8_H_ 4237 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698