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

Side by Side Diff: third_party/WebKit/Source/bindings/IDLExtendedAttributes.md

Issue 2335203006: Add [CachedAccessor] attribute to cache (almost) constant accessors (window.document). (Closed)
Patch Set: Pre-review nits Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 # Blink IDL Extended Attributes 1 # Blink IDL Extended Attributes
2 2
3 [TOC] 3 [TOC]
4 4
5 ## Introduction 5 ## Introduction
6 6
7 The main interest in extended attributes are their _semantics_: Blink implements many more extended attributes than the Web IDL standard, to specify various beh avior. 7 The main interest in extended attributes are their _semantics_: Blink implements many more extended attributes than the Web IDL standard, to specify various beh avior.
8 8
9 The authoritative list of allowed extended attributes and values is [bindings/ID LExtendedAttributes.txt](https://code.google.com/p/chromium/codesearch#chromium/ src/third_party/WebKit/Source/bindings/IDLExtendedAttributes.txt). This is compl ete but not necessarily precise (there may be unused extended attributes or valu es), since validation is run on build, but coverage isn't checked. 9 The authoritative list of allowed extended attributes and values is [bindings/ID LExtendedAttributes.txt](https://code.google.com/p/chromium/codesearch#chromium/ src/third_party/WebKit/Source/bindings/IDLExtendedAttributes.txt). This is compl ete but not necessarily precise (there may be unused extended attributes or valu es), since validation is run on build, but coverage isn't checked.
10 10
(...skipping 1555 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 v8::FunctionCallback callback) 1566 v8::FunctionCallback callback)
1567 { 1567 {
1568 v8::experimental::FastAccessorBuilder* fab = 1568 v8::experimental::FastAccessorBuilder* fab =
1569 v8::experimental::FastAccessorBuilder::New(isolate); 1569 v8::experimental::FastAccessorBuilder::New(isolate);
1570 fab->ReturnValue(fab->IntegerContant(123)); 1570 fab->ReturnValue(fab->IntegerContant(123));
1571 return fab; 1571 return fab;
1572 } 1572 }
1573 1573
1574 ``` 1574 ```
1575 1575
1576
1577 ### [StoreInField] _(a)_
haraken 2016/09/15 09:26:10 [CacheAttributeGetterResult] ? (Given that an ext
1578
1579 Summary: Caches invariable accessors to a private property. Private property nam e is automatically generated e.g. "Class#attribute".
jochen (gone - plz use gerrit) 2016/09/15 08:20:51 hum, that sounds like there'd be some automatic ca
1580
1581
1582 *** note
1583 Useful for performance critical scenarios, where the accessor does little or non e computation at all (peek a field), removing the calling overhead.
1584 Calls to the getter will be translated into a faster property load.
1585 ***
1586
1587 Usage: `[StoreInField]` takes no arguments, can be specified on attributes.
1588
1589
1576 ## Discouraged Blink-specific IDL Extended Attributes 1590 ## Discouraged Blink-specific IDL Extended Attributes
1577 1591
1578 These extended attributes are _discouraged_ - they are not deprecated, but they should be avoided and removed if possible. 1592 These extended attributes are _discouraged_ - they are not deprecated, but they should be avoided and removed if possible.
1579 1593
1580 ### [DoNotCheckConstants] _(i)_ 1594 ### [DoNotCheckConstants] _(i)_
1581 1595
1582 Summary: `[DoNotCheckConstants]` indicates that constant values in an IDL file c an be different from constant values in Blink implementation. 1596 Summary: `[DoNotCheckConstants]` indicates that constant values in an IDL file c an be different from constant values in Blink implementation.
1583 1597
1584 Usage: `[DoNotCheckConstants]` can be specified on interfaces: 1598 Usage: `[DoNotCheckConstants]` can be specified on interfaces:
1585 1599
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
1649 Copyright (C) 2009 Apple Inc. All rights reserved. 1663 Copyright (C) 2009 Apple Inc. All rights reserved.
1650 1664
1651 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1665 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1652 1666
1653 1. Redistributions of source code must retain the above copyright notice, this l ist of conditions and the following disclaimer. 1667 1. Redistributions of source code must retain the above copyright notice, this l ist of conditions and the following disclaimer.
1654 1668
1655 2. Redistributions in binary form must reproduce the above copyright notice, thi s list of conditions and the following disclaimer in the documentation and/or ot her materials provided with the distribution. 1669 2. Redistributions in binary form must reproduce the above copyright notice, thi s list of conditions and the following disclaimer in the documentation and/or ot her materials provided with the distribution.
1656 1670
1657 THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS “AS IS” AND ANY EXP RESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIE S OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, I NCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMI TED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFI TS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHE THER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSI BILITY OF SUCH DAMAGE. 1671 THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS “AS IS” AND ANY EXP RESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIE S OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, I NCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMI TED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFI TS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHE THER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSI BILITY OF SUCH DAMAGE.
1658 *** 1672 ***
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698