Version 3.19.18
Fixed read-only attribute of Function.length in strict mode. (issue 2705)
Fixed Runtime_SetProperty to properly handle OOM failures (Chromium issue 249873)
Emit deprecated check for constant function transitions. (Chromium issue 250609)
Made MathFloorOfDiv optimization trigger more often (Issue 2205)
Make more GCs in idle notification handler. (Chromium issue 241815)
Increased default type info threshold. (Issue 2730)
git-svn-id: http://v8.googlecode.com/svn/trunk@15191 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/include/v8.h b/include/v8.h
index d2a5322..0f949a8 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -220,8 +220,6 @@
}
-#define V8_USE_UNSAFE_HANDLES
-
/**
* An object reference managed by the v8 garbage collector.
*
@@ -492,10 +490,10 @@
public:
#ifndef V8_USE_UNSAFE_HANDLES
V8_INLINE(Persistent()) : val_(0) { }
- V8_INLINE(~Persistent()) {
- // TODO(dcarney): add this back before cutover.
- // Dispose();
- }
+ // TODO(dcarney): add this back before cutover.
+// V8_INLINE(~Persistent()) {
+// Dispose();
+// }
V8_INLINE(bool IsEmpty() const) { return val_ == 0; }
// TODO(dcarney): remove somehow before cutover
// The handle should either be 0, or a pointer to a live cell.
@@ -5714,11 +5712,13 @@
template<typename T>
void ReturnValue<T>::Set(double i) {
+ TYPE_CHECK(T, Number);
Set(Number::New(GetIsolate(), i));
}
template<typename T>
void ReturnValue<T>::Set(int32_t i) {
+ TYPE_CHECK(T, Integer);
typedef internal::Internals I;
if (V8_LIKELY(I::IsValidSmi(i))) {
*value_ = I::IntToSmi(i);
@@ -5729,6 +5729,7 @@
template<typename T>
void ReturnValue<T>::Set(uint32_t i) {
+ TYPE_CHECK(T, Integer);
typedef internal::Internals I;
// Can't simply use INT32_MAX here for whatever reason.
bool fits_into_int32_t = (i & (1 << 31)) == 0;
@@ -5741,6 +5742,7 @@
template<typename T>
void ReturnValue<T>::Set(bool value) {
+ TYPE_CHECK(T, Boolean);
typedef internal::Internals I;
int root_index;
if (value) {
@@ -5753,18 +5755,21 @@
template<typename T>
void ReturnValue<T>::SetNull() {
+ TYPE_CHECK(T, Primitive);
typedef internal::Internals I;
*value_ = *I::GetRoot(GetIsolate(), I::kNullValueRootIndex);
}
template<typename T>
void ReturnValue<T>::SetUndefined() {
+ TYPE_CHECK(T, Primitive);
typedef internal::Internals I;
*value_ = *I::GetRoot(GetIsolate(), I::kUndefinedValueRootIndex);
}
template<typename T>
void ReturnValue<T>::SetEmptyString() {
+ TYPE_CHECK(T, String);
typedef internal::Internals I;
*value_ = *I::GetRoot(GetIsolate(), I::kEmptyStringRootIndex);
}