diff options
author | Ben Murdoch <benm@google.com> | 2012-04-11 18:30:58 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2012-04-11 18:39:07 +0100 |
commit | 85b71799222b55eb5dd74ea26efe0c64ab655c8c (patch) | |
tree | 0d0fa6be365df4b76fe2985458b3a9b9afd80988 /src/api.h | |
parent | 5d4cdbf7a67d3662fa0bee4efdb7edd8daec9b0b (diff) | |
download | android_external_v8-85b71799222b55eb5dd74ea26efe0c64ab655c8c.tar.gz android_external_v8-85b71799222b55eb5dd74ea26efe0c64ab655c8c.tar.bz2 android_external_v8-85b71799222b55eb5dd74ea26efe0c64ab655c8c.zip |
Roll V8 back to 3.6
Roll back to V8 3.6 to fix x86 build, we don't have ucontext.h.
This reverts commits:
5d4cdbf7a67d3662fa0bee4efdb7edd8daec9b0b
c7cc028aaeedbbfa11c11d0b7b243b3d9e837ed9
592a9fc1d8ea420377a2e7efd0600e20b058be2b
Bug: 5688872
Change-Id: Ic961bb5e65b778e98bbfb71cce71d99fa949e995
Diffstat (limited to 'src/api.h')
-rw-r--r-- | src/api.h | 28 |
1 files changed, 15 insertions, 13 deletions
@@ -1,4 +1,4 @@ -// Copyright 2012 the V8 project authors. All rights reserved. +// Copyright 2011 the V8 project authors. All rights reserved. // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -28,14 +28,10 @@ #ifndef V8_API_H_ #define V8_API_H_ -#include "v8.h" - -#include "../include/v8-testing.h" #include "apiutils.h" -#include "contexts.h" #include "factory.h" -#include "isolate.h" -#include "list-inl.h" + +#include "../include/v8-testing.h" namespace v8 { @@ -116,16 +112,15 @@ void NeanderObject::set(int offset, v8::internal::Object* value) { } -template <typename T> inline T ToCData(v8::internal::Object* obj) { +template <typename T> static inline T ToCData(v8::internal::Object* obj) { STATIC_ASSERT(sizeof(T) == sizeof(v8::internal::Address)); return reinterpret_cast<T>( - reinterpret_cast<intptr_t>( - v8::internal::Foreign::cast(obj)->foreign_address())); + reinterpret_cast<intptr_t>(v8::internal::Foreign::cast(obj)->address())); } template <typename T> -inline v8::internal::Handle<v8::internal::Object> FromCData(T obj) { +static inline v8::internal::Handle<v8::internal::Object> FromCData(T obj) { STATIC_ASSERT(sizeof(T) == sizeof(v8::internal::Address)); return FACTORY->NewForeign( reinterpret_cast<v8::internal::Address>(reinterpret_cast<intptr_t>(obj))); @@ -141,6 +136,10 @@ class ApiFunction { }; +enum ExtensionTraversalState { + UNVISITED, VISITED, INSTALLED +}; + class RegisteredExtension { public: @@ -149,11 +148,14 @@ class RegisteredExtension { Extension* extension() { return extension_; } RegisteredExtension* next() { return next_; } RegisteredExtension* next_auto() { return next_auto_; } + ExtensionTraversalState state() { return state_; } + void set_state(ExtensionTraversalState value) { state_ = value; } static RegisteredExtension* first_extension() { return first_extension_; } private: Extension* extension_; RegisteredExtension* next_; RegisteredExtension* next_auto_; + ExtensionTraversalState state_; static RegisteredExtension* first_extension_; }; @@ -240,7 +242,7 @@ class Utils { template <class T> -inline T* ToApi(v8::internal::Handle<v8::internal::Object> obj) { +static inline T* ToApi(v8::internal::Handle<v8::internal::Object> obj) { return reinterpret_cast<T*>(obj.location()); } @@ -481,7 +483,7 @@ class HandleScopeImplementer { }; -const int kHandleBlockSize = v8::internal::KB - 2; // fit in one page +static const int kHandleBlockSize = v8::internal::KB - 2; // fit in one page void HandleScopeImplementer::SaveContext(Context* context) { |