Commit 530a4c8f authored by jsbell@chromium.org's avatar jsbell@chromium.org

Bindings: Make interface operation properties configurable

Per the Web IDL spec [1]:

4.5.8. Operations: "The property has attributes {
[[Writable]]: B, [[Enumerable]]: true, [[Configurable]]: B
}, where B is false if the operation is unforgeable on the
interface, and true otherwise."

In other words, Object.getOwnPropertyDescriptor(i.p, 'm')
should have configurable: true, except for [Unforgeable]
which is already special-cased.

[1] http://heycam.github.io/webidl/#es-operations

BUG=138217,377476

Review URL: https://codereview.chromium.org/948583002

git-svn-id: svn://svn.chromium.org/blink/trunk@190695 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 34c7f54d
......@@ -1311,10 +1311,6 @@ crbug.com/247716 [ Mac XP ] editing/spelling/inline-spelling-markers-hidpi-compo
crbug.com/381730 http/tests/navigation/pending-location-change-assert.html [ Pass Failure ]
crbug.com/377476 fast/js/function-name.html [ NeedsManualRebaseline ]
crbug.com/377476 fast/js/getOwnPropertyDescriptor.html [ NeedsManualRebaseline ]
crbug.com/377476 fast/js/mozilla/strict/function-name-arity.html [ NeedsManualRebaseline ]
crbug.com/436477 fast/js/mozilla/strict/assign-to-callee-name.html [ NeedsManualRebaseline ]
crbug.com/361729 [ MountainLion ] printing/return-from-printing-mode.html [ Failure ImageOnlyFailure ]
......
Failed assertion window.HTMLCanvasElement.prototype.getContext === undefined (got 1[number], expected [undefined])
Passed
......@@ -33,7 +33,12 @@ PASS Object.getOwnPropertyDescriptor(document.__proto__.__proto__, 'createElemen
PASS Object.getOwnPropertyDescriptor(document.__proto__.__proto__, 'createElement').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(document.__proto__.__proto__, 'createElement').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(document.__proto__.__proto__, 'createElement').enumerable is true
PASS Object.getOwnPropertyDescriptor(document.__proto__.__proto__, 'createElement').configurable is false
PASS Object.getOwnPropertyDescriptor(document.__proto__.__proto__, 'createElement').configurable is true
PASS Object.getOwnPropertyDescriptor(window, 'location').value is window.location
PASS Object.getOwnPropertyDescriptor(window, 'location').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(window, 'location').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(window, 'location').enumerable is true
PASS Object.getOwnPropertyDescriptor(window, 'location').configurable is false
PASS Object.getOwnPropertyDescriptor(Number, 'NEGATIVE_INFINITY').value is Number.NEGATIVE_INFINITY
PASS Object.getOwnPropertyDescriptor(Number, 'NEGATIVE_INFINITY').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(Number, 'NEGATIVE_INFINITY').hasOwnProperty('set') is false
......
......@@ -23,7 +23,8 @@ descriptorShouldBe("Array.prototype", "'concat'", {writable: true, enumerable: f
descriptorShouldBe("Date.prototype", "'toISOString'", {writable: true, enumerable: false, configurable: true, value: "Date.prototype.toISOString"});
descriptorShouldBe("String.prototype", "'concat'", {writable: true, enumerable: false, configurable: true, value:"String.prototype.concat"});
descriptorShouldBe("RegExp.prototype", "'exec'", {writable: true, enumerable: false, configurable: true, value:"RegExp.prototype.exec"});
descriptorShouldBe("document.__proto__.__proto__", "'createElement'", {writable: true, enumerable: true, configurable: false, value:"document.createElement"});
descriptorShouldBe("document.__proto__.__proto__", "'createElement'", {writable: true, enumerable: true, configurable: true, value:"document.createElement"});
descriptorShouldBe("window", "'location'", {writable: false, enumerable: true, configurable: false, value: "window.location"});
descriptorShouldBe("Number", "'NEGATIVE_INFINITY'", {writable: false, enumerable: false, configurable: false, value:"Number.NEGATIVE_INFINITY"});
descriptorShouldBe("RegExp", "'$_'", {writable: true, enumerable: false, configurable: true, value:"RegExp.$_"});
descriptorShouldBe("/a/g", "'global'", {writable: true, enumerable: false, configurable: false, value:true});
......
......@@ -8,7 +8,7 @@ partial interface Performance {
DOMHighResTimeStamp now();
};
FAIL Performance interface: operation now() assert_true: property is not configurable expected true got false
PASS Performance interface: operation now()
PASS Performance must be primary interface of window.performance
PASS Stringification of window.performance
PASS Performance interface: window.performance must inherit property "now" with the proper type (0)
......
......@@ -17,10 +17,10 @@ interface PerformanceMeasure : PerformanceEntry {
};
FAIL Performance interface: operation mark(DOMString) assert_true: property is not configurable expected true got false
FAIL Performance interface: operation clearMarks(DOMString) assert_true: property is not configurable expected true got false
FAIL Performance interface: operation measure(DOMString,DOMString,DOMString) assert_true: property is not configurable expected true got false
FAIL Performance interface: operation clearMeasures(DOMString) assert_true: property is not configurable expected true got false
PASS Performance interface: operation mark(DOMString)
PASS Performance interface: operation clearMarks(DOMString)
PASS Performance interface: operation measure(DOMString,DOMString,DOMString)
PASS Performance interface: operation clearMeasures(DOMString)
PASS Performance must be primary interface of window.performance
PASS Stringification of window.performance
PASS Performance interface: window.performance must inherit property "mark" with the proper type (0)
......
......@@ -249,7 +249,7 @@ v8::Local<v8::Signature> V8DOMConfiguration::installDOMClassTemplate(v8::Isolate
if (accessorCount)
installAccessors(isolate, functionDescriptor->PrototypeTemplate(), defaultSignature, accessors, accessorCount);
if (callbackCount)
installMethods(isolate, functionDescriptor->PrototypeTemplate(), defaultSignature, static_cast<v8::PropertyAttribute>(v8::DontDelete), callbacks, callbackCount);
installMethods(isolate, functionDescriptor->PrototypeTemplate(), defaultSignature, static_cast<v8::PropertyAttribute>(v8::None), callbacks, callbackCount);
return defaultSignature;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment