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

Side by Side Diff: include/v8.h

Issue 900123003: Add NativeWeakMap to v8.h (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Applied r26428 Created 5 years, 10 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
« no previous file with comments | « no previous file | src/api.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** \mainpage V8 API Reference Guide 5 /** \mainpage V8 API Reference Guide
6 * 6 *
7 * V8 is Google's open source JavaScript engine. 7 * V8 is Google's open source JavaScript engine.
8 * 8 *
9 * This set of documents provides reference material generated from the 9 * This set of documents provides reference material generated from the
10 * V8 header file, include/v8.h. 10 * V8 header file, include/v8.h.
(...skipping 1518 matching lines...) Expand 10 before | Expand all | Expand 10 after
1529 * Tries to parse the string |json_string| and returns it as value if 1529 * Tries to parse the string |json_string| and returns it as value if
1530 * successful. 1530 * successful.
1531 * 1531 *
1532 * \param json_string The string to parse. 1532 * \param json_string The string to parse.
1533 * \return The corresponding value if successfully parsed. 1533 * \return The corresponding value if successfully parsed.
1534 */ 1534 */
1535 static Local<Value> Parse(Local<String> json_string); 1535 static Local<Value> Parse(Local<String> json_string);
1536 }; 1536 };
1537 1537
1538 1538
1539 /**
1540 * A map whose keys are referenced weakly. It is similar to JavaScript WeakMap
1541 * but can be created without entering a v8::Context and hence shouldn't
1542 * escape to JavaScript.
1543 */
1544 class V8_EXPORT NativeWeakMap : public Data {
1545 public:
1546 static Local<NativeWeakMap> New(Isolate* isolate);
1547 void Set(Handle<Value> key, Handle<Value> value);
1548 Local<Value> Get(Handle<Value> key);
1549 bool Has(Handle<Value> key);
1550 bool Delete(Handle<Value> key);
1551 };
1552
1553
1539 // --- Value --- 1554 // --- Value ---
1540 1555
1541 1556
1542 /** 1557 /**
1543 * The superclass of all JavaScript values and objects. 1558 * The superclass of all JavaScript values and objects.
1544 */ 1559 */
1545 class V8_EXPORT Value : public Data { 1560 class V8_EXPORT Value : public Data {
1546 public: 1561 public:
1547 /** 1562 /**
1548 * Returns true if this value is the undefined value. See ECMA-262 1563 * Returns true if this value is the undefined value. See ECMA-262
(...skipping 5938 matching lines...) Expand 10 before | Expand all | Expand 10 after
7487 */ 7502 */
7488 7503
7489 7504
7490 } // namespace v8 7505 } // namespace v8
7491 7506
7492 7507
7493 #undef TYPE_CHECK 7508 #undef TYPE_CHECK
7494 7509
7495 7510
7496 #endif // V8_H_ 7511 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698