OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 2805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2816 protoTemplate ->Set(v8::String::NewFromUtf8(v8Isolate, "push"), v8::Func
tionTemplate::New(v8Isolate, arrayPushCallback), v8::DontEnum); | 2816 protoTemplate ->Set(v8::String::NewFromUtf8(v8Isolate, "push"), v8::Func
tionTemplate::New(v8Isolate, arrayPushCallback), v8::DontEnum); |
2817 protoTemplate ->Set(v8::String::NewFromUtf8(v8Isolate, "pop"), v8::Funct
ionTemplate::New(v8Isolate, arrayPopCallback), v8::DontEnum); | 2817 protoTemplate ->Set(v8::String::NewFromUtf8(v8Isolate, "pop"), v8::Funct
ionTemplate::New(v8Isolate, arrayPopCallback), v8::DontEnum); |
2818 protoTemplate ->Set(v8::String::NewFromUtf8(v8Isolate, "concat"), v8::Fu
nctionTemplate::New(v8Isolate, concatCallback), v8::DontEnum); | 2818 protoTemplate ->Set(v8::String::NewFromUtf8(v8Isolate, "concat"), v8::Fu
nctionTemplate::New(v8Isolate, concatCallback), v8::DontEnum); |
2819 protoTemplate ->Set(v8::String::NewFromUtf8(v8Isolate, "reverse"), v8::F
unctionTemplate::New(v8Isolate, arrayReverseCallback), v8::DontEnum); | 2819 protoTemplate ->Set(v8::String::NewFromUtf8(v8Isolate, "reverse"), v8::F
unctionTemplate::New(v8Isolate, arrayReverseCallback), v8::DontEnum); |
2820 | 2820 |
2821 protoTemplate ->Set(v8::String::NewFromUtf8(v8Isolate, "shift"), v8::Fun
ctionTemplate::New(v8Isolate, arrayShiftCallback), v8::DontEnum); | 2821 protoTemplate ->Set(v8::String::NewFromUtf8(v8Isolate, "shift"), v8::Fun
ctionTemplate::New(v8Isolate, arrayShiftCallback), v8::DontEnum); |
2822 protoTemplate ->Set(v8::String::NewFromUtf8(v8Isolate, "unshift"), v8::F
unctionTemplate::New(v8Isolate, arrayUnshiftCallback), v8::DontEnum); | 2822 protoTemplate ->Set(v8::String::NewFromUtf8(v8Isolate, "unshift"), v8::F
unctionTemplate::New(v8Isolate, arrayUnshiftCallback), v8::DontEnum); |
2823 protoTemplate ->Set(v8::String::NewFromUtf8(v8Isolate, "splice"), v8::Fu
nctionTemplate::New(v8Isolate, arraySpliceCallback), v8::DontEnum); | 2823 protoTemplate ->Set(v8::String::NewFromUtf8(v8Isolate, "splice"), v8::Fu
nctionTemplate::New(v8Isolate, arraySpliceCallback), v8::DontEnum); |
2824 protoTemplate ->Set(v8::String::NewFromUtf8(v8Isolate, "sort"), v8::Func
tionTemplate::New(v8Isolate, arraySortCallback), v8::DontEnum); | 2824 protoTemplate ->Set(v8::String::NewFromUtf8(v8Isolate, "sort"), v8::Func
tionTemplate::New(v8Isolate, arraySortCallback), v8::DontEnum); |
2825 protoTemplate ->Set(v8::String::NewFromUtf8(v8Isolate, "$toJsArray"), v8
::FunctionTemplate::New(v8Isolate, toJsArrayCallback), v8::DontEnum); | 2825 protoTemplate ->Set(v8::String::NewFromUtf8(v8Isolate, "$toJsArray"), v8
::FunctionTemplate::New(v8Isolate, toJsArrayCallback), v8::DontEnum); |
| 2826 protoTemplate ->Set(v8::String::NewFromUtf8(v8Isolate, "toJSON"), v8::Fu
nctionTemplate::New(v8Isolate, toJsArrayCallback), v8::DontEnum); |
2826 | 2827 |
2827 // ES6 experimental properties not currently supported that we could sup
port if needed. | 2828 // ES6 experimental properties not currently supported that we could sup
port if needed. |
2828 // These would require building separate live proxy objects. | 2829 // These would require building separate live proxy objects. |
2829 // "entries", | 2830 // "entries", |
2830 // "values", | 2831 // "values", |
2831 // "keys" | 2832 // "keys" |
2832 | 2833 |
2833 v8::Local<v8::ObjectTemplate> instanceTemplate = setupInstanceTemplate(p
roxyTemplateLocal); | 2834 v8::Local<v8::ObjectTemplate> instanceTemplate = setupInstanceTemplate(p
roxyTemplateLocal); |
2834 instanceTemplate->SetIndexedPropertyHandler(&indexedGetterArray, &indexe
dSetterArray, 0, 0, &indexedEnumeratorArray); | 2835 instanceTemplate->SetIndexedPropertyHandler(&indexedGetterArray, &indexe
dSetterArray, 0, 0, &indexedEnumeratorArray); |
2835 instanceTemplate->SetNamedPropertyHandler(&arrayNamedPropertyGetter, &ar
rayNamedPropertySetter, &arrayQueryProperty, &arrayDeleteProperty, 0); | 2836 instanceTemplate->SetNamedPropertyHandler(&arrayNamedPropertyGetter, &ar
rayNamedPropertySetter, &arrayQueryProperty, &arrayDeleteProperty, 0); |
(...skipping 26 matching lines...) Expand all Loading... |
2862 | 2863 |
2863 proxyTemplateLocal->SetClassName(v8::String::NewFromUtf8(v8Isolate, "Dar
tObject")); | 2864 proxyTemplateLocal->SetClassName(v8::String::NewFromUtf8(v8Isolate, "Dar
tObject")); |
2864 setupInstanceTemplate(proxyTemplateLocal); | 2865 setupInstanceTemplate(proxyTemplateLocal); |
2865 } else { | 2866 } else { |
2866 proxyTemplateLocal = v8::Local<v8::FunctionTemplate>::New(v8Isolate, pro
xyTemplate); | 2867 proxyTemplateLocal = v8::Local<v8::FunctionTemplate>::New(v8Isolate, pro
xyTemplate); |
2867 } | 2868 } |
2868 return proxyTemplateLocal; | 2869 return proxyTemplateLocal; |
2869 } | 2870 } |
2870 | 2871 |
2871 } | 2872 } |
OLD | NEW |