aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2012-03-05 11:04:45 +0000
committerBen Murdoch <benm@google.com>2012-04-11 15:39:56 +0100
commit592a9fc1d8ea420377a2e7efd0600e20b058be2b (patch)
tree23fe22995f4f9056a96266d169d49426a5e745d7 /include
parente25ed7434cc3a061dd965ad25b923bca153aed94 (diff)
downloadv8-592a9fc1d8ea420377a2e7efd0600e20b058be2b.tar.gz
Merge V8 at 3.7.12.28
Bug: 5688872 Change-Id: Iddb40cae44d51a2b449f2858951e0472771f5981
Diffstat (limited to 'include')
-rwxr-xr-x[-rw-r--r--]include/v8-debug.h5
-rw-r--r--include/v8.h53
2 files changed, 45 insertions, 13 deletions
diff --git a/include/v8-debug.h b/include/v8-debug.h
index 504cbfed..9e85dc46 100644..100755
--- a/include/v8-debug.h
+++ b/include/v8-debug.h
@@ -340,6 +340,11 @@ class EXPORT Debug {
bool wait_for_connection = false);
/**
+ * Disable the V8 builtin debug agent. The TCP/IP connection will be closed.
+ */
+ static void DisableAgent();
+
+ /**
* Makes V8 process all pending debug messages.
*
* From V8 point of view all debug messages come asynchronously (e.g. from
diff --git a/include/v8.h b/include/v8.h
index 4b7f6e73..7cad7b62 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -1171,7 +1171,8 @@ class String : public Primitive {
* Get the ExternalAsciiStringResource for an external ASCII string.
* Returns NULL if IsExternalAscii() doesn't return true.
*/
- V8EXPORT ExternalAsciiStringResource* GetExternalAsciiStringResource() const;
+ V8EXPORT const ExternalAsciiStringResource* GetExternalAsciiStringResource()
+ const;
static inline String* Cast(v8::Value* obj);
@@ -1735,9 +1736,16 @@ class Function : public Object {
* kLineOffsetNotFound if no information available.
*/
V8EXPORT int GetScriptLineNumber() const;
+ /**
+ * Returns zero based column number of function body and
+ * kLineOffsetNotFound if no information available.
+ */
+ V8EXPORT int GetScriptColumnNumber() const;
+ V8EXPORT Handle<Value> GetScriptId() const;
V8EXPORT ScriptOrigin GetScriptOrigin() const;
static inline Function* Cast(Value* obj);
V8EXPORT static const int kLineOffsetNotFound;
+
private:
V8EXPORT Function();
V8EXPORT static void CheckCast(Value* obj);
@@ -2451,24 +2459,42 @@ class V8EXPORT TypeSwitch : public Data {
// --- Extensions ---
+class V8EXPORT ExternalAsciiStringResourceImpl
+ : public String::ExternalAsciiStringResource {
+ public:
+ ExternalAsciiStringResourceImpl() : data_(0), length_(0) {}
+ ExternalAsciiStringResourceImpl(const char* data, size_t length)
+ : data_(data), length_(length) {}
+ const char* data() const { return data_; }
+ size_t length() const { return length_; }
+
+ private:
+ const char* data_;
+ size_t length_;
+};
/**
* Ignore
*/
class V8EXPORT Extension { // NOLINT
public:
+ // Note that the strings passed into this constructor must live as long
+ // as the Extension itself.
Extension(const char* name,
const char* source = 0,
int dep_count = 0,
- const char** deps = 0);
+ const char** deps = 0,
+ int source_length = -1);
virtual ~Extension() { }
virtual v8::Handle<v8::FunctionTemplate>
GetNativeFunction(v8::Handle<v8::String> name) {
return v8::Handle<v8::FunctionTemplate>();
}
- const char* name() { return name_; }
- const char* source() { return source_; }
+ const char* name() const { return name_; }
+ size_t source_length() const { return source_length_; }
+ const String::ExternalAsciiStringResource* source() const {
+ return &source_; }
int dependency_count() { return dep_count_; }
const char** dependencies() { return deps_; }
void set_auto_enable(bool value) { auto_enable_ = value; }
@@ -2476,7 +2502,8 @@ class V8EXPORT Extension { // NOLINT
private:
const char* name_;
- const char* source_;
+ size_t source_length_; // expected to initialize before source_
+ ExternalAsciiStringResourceImpl source_;
int dep_count_;
const char** deps_;
bool auto_enable_;
@@ -3498,9 +3525,9 @@ class V8EXPORT Context {
*
* v8::Locker is a scoped lock object. While it's
* active (i.e. between its construction and destruction) the current thread is
- * allowed to use the locked isolate. V8 guarantees that an isolate can be locked
- * by at most one thread at any time. In other words, the scope of a v8::Locker is
- * a critical section.
+ * allowed to use the locked isolate. V8 guarantees that an isolate can be
+ * locked by at most one thread at any time. In other words, the scope of a
+ * v8::Locker is a critical section.
*
* Sample usage:
* \code
@@ -3602,8 +3629,8 @@ class V8EXPORT Locker {
static void StopPreemption();
/**
- * Returns whether or not the locker for a given isolate, or default isolate if NULL is given,
- * is locked by the current thread.
+ * Returns whether or not the locker for a given isolate, or default isolate
+ * if NULL is given, is locked by the current thread.
*/
static bool IsLocked(Isolate* isolate = NULL);
@@ -3677,8 +3704,8 @@ class V8EXPORT ActivityControl { // NOLINT
namespace internal {
-static const int kApiPointerSize = sizeof(void*); // NOLINT
-static const int kApiIntSize = sizeof(int); // NOLINT
+const int kApiPointerSize = sizeof(void*); // NOLINT
+const int kApiIntSize = sizeof(int); // NOLINT
// Tag information for HeapObject.
const int kHeapObjectTag = 1;
@@ -3769,7 +3796,7 @@ class Internals {
static const int kFullStringRepresentationMask = 0x07;
static const int kExternalTwoByteRepresentationTag = 0x02;
- static const int kJSObjectType = 0xa3;
+ static const int kJSObjectType = 0xa6;
static const int kFirstNonstringType = 0x80;
static const int kForeignType = 0x85;