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

Unified Diff: src/elements.h

Issue 932693003: Revert of Remove handle wrappers from basic elements accessors (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/builtins.cc ('k') | src/elements.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/elements.h
diff --git a/src/elements.h b/src/elements.h
index 1c299a1f67d49443a1a34643e7765b7a00271ed5..1d80b25891009325a002000fd868a22b732b45a1 100644
--- a/src/elements.h
+++ b/src/elements.h
@@ -32,11 +32,15 @@
// in the backing store to use for the check, which must be compatible with
// the ElementsKind of the ElementsAccessor. If backing_store is NULL, the
// holder->elements() is used as the backing store.
- virtual bool HasElement(JSObject* holder, uint32_t key,
- FixedArrayBase* backing_store) = 0;
-
- inline bool HasElement(JSObject* holder, uint32_t key) {
- return HasElement(holder, key, holder->elements());
+ virtual bool HasElement(
+ Handle<JSObject> holder,
+ uint32_t key,
+ Handle<FixedArrayBase> backing_store) = 0;
+
+ inline bool HasElement(
+ Handle<JSObject> holder,
+ uint32_t key) {
+ return HasElement(holder, key, handle(holder->elements()));
}
// Returns the element with the specified key or undefined if there is no such
@@ -63,11 +67,14 @@
// be compatible with the ElementsKind of the ElementsAccessor. If
// backing_store is NULL, the holder->elements() is used as the backing store.
MUST_USE_RESULT virtual PropertyAttributes GetAttributes(
- JSObject* holder, uint32_t key, FixedArrayBase* backing_store) = 0;
-
- MUST_USE_RESULT inline PropertyAttributes GetAttributes(JSObject* holder,
- uint32_t key) {
- return GetAttributes(holder, key, holder->elements());
+ Handle<JSObject> holder,
+ uint32_t key,
+ Handle<FixedArrayBase> backing_store) = 0;
+
+ MUST_USE_RESULT inline PropertyAttributes GetAttributes(
+ Handle<JSObject> holder,
+ uint32_t key) {
+ return GetAttributes(holder, key, handle(holder->elements()));
}
// Returns an element's accessors, or NULL if the element does not exist or
@@ -168,7 +175,7 @@
return elements_accessors_[elements_kind];
}
- static ElementsAccessor* ForArray(FixedArrayBase* array);
+ static ElementsAccessor* ForArray(Handle<FixedArrayBase> array);
static void InitializeOncePerProcess();
static void TearDown();
@@ -176,7 +183,7 @@
protected:
friend class SloppyArgumentsElementsAccessor;
- virtual uint32_t GetCapacity(FixedArrayBase* backing_store) = 0;
+ virtual uint32_t GetCapacity(Handle<FixedArrayBase> backing_store) = 0;
// Element handlers distinguish between indexes and keys when they manipulate
// elements. Indexes refer to elements in terms of their location in the
« no previous file with comments | « src/builtins.cc ('k') | src/elements.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698