Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
chakrashim: handle Symbol as property name
Browse files Browse the repository at this point in the history
Also remove some unused code, cache a few propertyIds, refactor a few code
for better perf.

Reviewed-by: @kunalspathak
  • Loading branch information
Jianchun Xu committed Jul 31, 2015
1 parent e17502f commit 9a88a51
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 331 deletions.
1 change: 0 additions & 1 deletion deps/chakrashim/include/v8.h
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,6 @@ class EXPORT Object : public Value {
Local<Value> GetPrototype();
bool SetPrototype(Handle<Value> prototype);
Maybe<bool> SetPrototype(Local<Context> context, Local<Value> prototype);
Local<Value> GetConstructor();
Local<Array> GetPropertyNames();
Local<Array> GetOwnPropertyNames();
bool HasOwnProperty(Handle<String> key);
Expand Down
4 changes: 4 additions & 0 deletions deps/chakrashim/src/jsrtcachedpropertyidref.inc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

DEF(apply)
DEF(construct)
DEF(constructor)
DEF(defineProperty)
DEF(deleteProperty)
DEF(enumerate)
Expand All @@ -36,6 +37,7 @@ DEF(getOwnPropertyDescriptor)
DEF(getPrototypeOf)
DEF(has)
DEF(isExtensible)
DEF(name)
DEF(ownKeys)
DEF(preventExtensions)
DEF(set)
Expand Down Expand Up @@ -72,6 +74,8 @@ DEF(byteOffset)
DEF(byteLength)

DEFSYMBOL(self)
DEFSYMBOL(__external__)
DEFSYMBOL(__hiddenvalues__)
DEFSYMBOL(__isexternal__)

#undef DEF
Expand Down
4 changes: 2 additions & 2 deletions deps/chakrashim/src/jsrtproxyutils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ JsErrorCode TryParseUInt32(
size_t strLength;

error = JsStringToPointer(strRef, &strPtr, &strLength);

if (error != JsNoError) {
return error;
// If strRef is not a string, just return not Uint32
return error == JsErrorInvalidArgument ? JsNoError : error;
}

// empty string
Expand Down
Loading

0 comments on commit 9a88a51

Please sign in to comment.