Skip to content

Instantly share code, notes, and snippets.

@evilpie
evilpie / gist:2bc4e7f94483b36c6e76
Created December 12, 2014 23:05
Remove getEnumerablePropertyKeys
diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -645,18 +645,16 @@ public:
JS::Handle<JSObject*> proxy,
JS::Handle<jsid> id,
JS::MutableHandle<JSPropertyDescriptor> desc)
const MOZ_OVERRIDE;
virtual bool hasOwn(JSContext *cx, JS::Handle<JSObject*> proxy,
JS::Handle<jsid> id, bool *bp) const MOZ_OVERRIDE;
# HG changeset patch
# Parent c6ae2f78d271f4bd87d8f0efb6086a8a624f0e4b
diff --git a/lib/contentPolicy.js b/lib/contentPolicy.js
--- a/lib/contentPolicy.js
+++ b/lib/contentPolicy.js
@@ -129,73 +129,92 @@ let Policy = exports.Policy =
Utils.styleService.loadAndRegisterSheet(collapseStyle, Ci.nsIStyleSheetService.USER_SHEET);
onShutdown.add(function()
{
diff --git a/js/src/jit-test/tests/proxy/testDirectProxyArrayLength.js b/js/src/jit-test/tests/proxy/testDirectProxyArrayLength.js
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/proxy/testDirectProxyArrayLength.js
@@ -0,0 +1,4 @@
+var a = [1, 2, 3];
+var p = new Proxy(a, {});
+assertEq(p.length, 3);
+assertEq(JSON.stringify(p), "[1,2,3]");
diff --git a/js/src/jit/IonCaches.cpp b/js/src/jit/IonCaches.cpp
diff --git a/js/public/StructuredClone.h b/js/public/StructuredClone.h
--- a/js/public/StructuredClone.h
+++ b/js/public/StructuredClone.h
@@ -235,11 +235,14 @@ JS_ReadTypedArray(JSStructuredCloneReade
JS_PUBLIC_API(bool)
JS_WriteUint32Pair(JSStructuredCloneWriter *w, uint32_t tag, uint32_t data);
JS_PUBLIC_API(bool)
JS_WriteBytes(JSStructuredCloneWriter *w, const void *p, size_t len);
diff --git a/browser/devtools/webconsole/console-output.js b/browser/devtools/webconsole/console-output.js
--- a/browser/devtools/webconsole/console-output.js
+++ b/browser/devtools/webconsole/console-output.js
@@ -831,16 +831,17 @@ Messages.Simple.prototype = Heritage.ext
if (this.element) {
return this;
}
let timestamp = new Widgets.MessageTimestamp(this, this.timestamp).render();
#define JSPROP_IGNORE_ENUMERATE 0x1000 /* ignore the value in JSPROP_ENUMERATE.
This flag only valid when defining over
an existing property. */
#define JSPROP_IGNORE_READONLY 0x2000 /* ignore the value in JSPROP_READONLY.
This flag only valid when defining over
an existing property. */
#define JSPROP_IGNORE_PERMANENT 0x4000 /* ignore the value in JSPROP_PERMANENT. */
#define JSPROP_ENUMERATE 0
#define JSPROP_IGNORE_ENUMERATE 0x1000 /* ignore the value in JSPROP_ENUMERATE.
This flag only valid when defining over
an existing property. */
#define JSPROP_IGNORE_READONLY 0x2000 /* ignore the value in JSPROP_READONLY.
This flag only valid when defining over
an existing property. */
#define JSPROP_IGNORE_PERMANENT 0x4000 /* ignore the value in JSPROP_PERMANENT. */
#define JSPROP_ENUMERATE 0
#current style
class Test:
constructor: (name) ->
@name: name
instancemethod()
@classmethod: (name) ->
"hey" + name
instancemethod: ->
"hey" + @name
x: (test...) ->
alert(test)
(function() {
var ident, result, x;
x = function(obj, func) {
return func(obj);
};
ident = function(x) {
return x;
};
result = x({
one: ident(1)