 Chromium Code Reviews
 Chromium Code Reviews Issue 1344583002:
  Continuing removing deprecated function from cctest  (Closed) 
  Base URL: https://chromium.googlesource.com/v8/v8.git@master
    
  
    Issue 1344583002:
  Continuing removing deprecated function from cctest  (Closed) 
  Base URL: https://chromium.googlesource.com/v8/v8.git@master| OLD | NEW | 
|---|---|
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 // TODO(mythria): Remove this define after this flag is turned on globally | |
| 6 #define V8_IMMINENT_DEPRECATION_WARNINGS | |
| 7 | |
| 5 #include <stdlib.h> | 8 #include <stdlib.h> | 
| 6 #include <utility> | 9 #include <utility> | 
| 7 | 10 | 
| 8 #include "src/v8.h" | 11 #include "src/v8.h" | 
| 9 | 12 | 
| 10 #include "src/compilation-cache.h" | 13 #include "src/compilation-cache.h" | 
| 11 #include "src/execution.h" | 14 #include "src/execution.h" | 
| 12 #include "src/factory.h" | 15 #include "src/factory.h" | 
| 13 #include "src/global-handles.h" | 16 #include "src/global-handles.h" | 
| 14 #include "src/ic/ic.h" | 17 #include "src/ic/ic.h" | 
| (...skipping 28 matching lines...) Expand all Loading... | |
| 43 | 46 | 
| 44 | 47 | 
| 45 static Handle<String> MakeName(const char* str, int suffix) { | 48 static Handle<String> MakeName(const char* str, int suffix) { | 
| 46 EmbeddedVector<char, 128> buffer; | 49 EmbeddedVector<char, 128> buffer; | 
| 47 SNPrintF(buffer, "%s%d", str, suffix); | 50 SNPrintF(buffer, "%s%d", str, suffix); | 
| 48 return MakeString(buffer.start()); | 51 return MakeString(buffer.start()); | 
| 49 } | 52 } | 
| 50 | 53 | 
| 51 | 54 | 
| 52 Handle<JSObject> GetObject(const char* name) { | 55 Handle<JSObject> GetObject(const char* name) { | 
| 53 return v8::Utils::OpenHandle( | 56 v8::Local<v8::Context> context = | 
| 54 *v8::Handle<v8::Object>::Cast(CcTest::global()->Get(v8_str(name)))); | 57 reinterpret_cast<v8::Isolate*>( | 
| 58 v8::Utils::OpenHandle(*CcTest::global())->GetIsolate()) | |
| 59 ->GetCurrentContext(); | |
| 
rmcilroy
2015/09/15 10:29:47
ditto
 
mythria
2015/09/17 11:21:48
Done.
 | |
| 60 return v8::Utils::OpenHandle(*v8::Local<v8::Object>::Cast( | |
| 61 CcTest::global()->Get(context, v8_str(name)).ToLocalChecked())); | |
| 55 } | 62 } | 
| 56 | 63 | 
| 57 | 64 | 
| 58 static double GetDoubleFieldValue(JSObject* obj, FieldIndex field_index) { | 65 static double GetDoubleFieldValue(JSObject* obj, FieldIndex field_index) { | 
| 59 if (obj->IsUnboxedDoubleField(field_index)) { | 66 if (obj->IsUnboxedDoubleField(field_index)) { | 
| 60 return obj->RawFastDoublePropertyAt(field_index); | 67 return obj->RawFastDoublePropertyAt(field_index); | 
| 61 } else { | 68 } else { | 
| 62 Object* value = obj->RawFastPropertyAt(field_index); | 69 Object* value = obj->RawFastPropertyAt(field_index); | 
| 63 DCHECK(value->IsMutableHeapNumber()); | 70 DCHECK(value->IsMutableHeapNumber()); | 
| 64 return HeapNumber::cast(value)->value(); | 71 return HeapNumber::cast(value)->value(); | 
| (...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1681 | 1688 | 
| 1682 // TODO(ishell): add respective tests for property kind reconfiguring from | 1689 // TODO(ishell): add respective tests for property kind reconfiguring from | 
| 1683 // accessor field to double, once accessor fields are supported by | 1690 // accessor field to double, once accessor fields are supported by | 
| 1684 // Map::ReconfigureProperty(). | 1691 // Map::ReconfigureProperty(). | 
| 1685 | 1692 | 
| 1686 | 1693 | 
| 1687 // TODO(ishell): add respective tests for fast property removal case once | 1694 // TODO(ishell): add respective tests for fast property removal case once | 
| 1688 // Map::ReconfigureProperty() supports that. | 1695 // Map::ReconfigureProperty() supports that. | 
| 1689 | 1696 | 
| 1690 #endif | 1697 #endif | 
| OLD | NEW |