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

Unified Diff: webkit/port/bindings/v8/v8_custom.cpp

Issue 9019: Make ExceptionContext platform-independent using magic headers (2/2) (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/port/bindings/v8/ExceptionContextData.h ('k') | webkit/port/bindings/v8/v8_nodefilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/port/bindings/v8/v8_custom.cpp
===================================================================
--- webkit/port/bindings/v8/v8_custom.cpp (revision 4425)
+++ webkit/port/bindings/v8/v8_custom.cpp (working copy)
@@ -3012,10 +3012,10 @@
TreeWalker* treeWalker = V8Proxy::ToNativeObject<TreeWalker>(
V8ClassIndex::TREEWALKER, args.Holder());
- OwnPtr<ExceptionContext> context(new ExceptionContext());
- RefPtr<Node> result = treeWalker->parentNode(context.get());
- if (context->hadException()) {
- v8::ThrowException(context->exception());
+ ExceptionContext context(NULL);
+ RefPtr<Node> result = treeWalker->parentNode(&context);
+ if (context.hadException()) {
+ v8::ThrowException(context.data());
return v8::Undefined();
}
if (!result) return v8::Null();
@@ -3027,10 +3027,10 @@
TreeWalker* treeWalker = V8Proxy::ToNativeObject<TreeWalker>(
V8ClassIndex::TREEWALKER, args.Holder());
- OwnPtr<ExceptionContext> context(new ExceptionContext());
- RefPtr<Node> result = treeWalker->firstChild(context.get());
- if (context->hadException()) {
- v8::ThrowException(context->exception());
+ ExceptionContext context(NULL);
+ RefPtr<Node> result = treeWalker->firstChild(&context);
+ if (context.hadException()) {
+ v8::ThrowException(context.data());
return v8::Undefined();
}
if (!result) return v8::Null();
@@ -3042,10 +3042,10 @@
TreeWalker* treeWalker = V8Proxy::ToNativeObject<TreeWalker>(
V8ClassIndex::TREEWALKER, args.Holder());
- OwnPtr<ExceptionContext> context(new ExceptionContext());
- RefPtr<Node> result = treeWalker->lastChild(context.get());
- if (context->hadException()) {
- v8::ThrowException(context->exception());
+ ExceptionContext context(NULL);
+ RefPtr<Node> result = treeWalker->lastChild(&context);
+ if (context.hadException()) {
+ v8::ThrowException(context.data());
return v8::Undefined();
}
if (!result) return v8::Null();
@@ -3057,10 +3057,10 @@
TreeWalker* treeWalker = V8Proxy::ToNativeObject<TreeWalker>(
V8ClassIndex::TREEWALKER, args.Holder());
- OwnPtr<ExceptionContext> context(new ExceptionContext());
- RefPtr<Node> result = treeWalker->nextNode(context.get());
- if (context->hadException()) {
- v8::ThrowException(context->exception());
+ ExceptionContext context(NULL);
+ RefPtr<Node> result = treeWalker->nextNode(&context);
+ if (context.hadException()) {
+ v8::ThrowException(context.data());
return v8::Undefined();
}
if (!result) return v8::Null();
@@ -3072,10 +3072,10 @@
TreeWalker* treeWalker = V8Proxy::ToNativeObject<TreeWalker>(
V8ClassIndex::TREEWALKER, args.Holder());
- OwnPtr<ExceptionContext> context(new ExceptionContext());
- RefPtr<Node> result = treeWalker->previousNode(context.get());
- if (context->hadException()) {
- v8::ThrowException(context->exception());
+ ExceptionContext context(NULL);
+ RefPtr<Node> result = treeWalker->previousNode(&context);
+ if (context.hadException()) {
+ v8::ThrowException(context.data());
return v8::Undefined();
}
if (!result) return v8::Null();
@@ -3087,10 +3087,10 @@
TreeWalker* treeWalker = V8Proxy::ToNativeObject<TreeWalker>(
V8ClassIndex::TREEWALKER, args.Holder());
- OwnPtr<ExceptionContext> context(new ExceptionContext());
- RefPtr<Node> result = treeWalker->nextSibling(context.get());
- if (context->hadException()) {
- v8::ThrowException(context->exception());
+ ExceptionContext context(NULL);
+ RefPtr<Node> result = treeWalker->nextSibling(&context);
+ if (context.hadException()) {
+ v8::ThrowException(context.data());
return v8::Undefined();
}
if (!result) return v8::Null();
@@ -3102,10 +3102,10 @@
TreeWalker* treeWalker = V8Proxy::ToNativeObject<TreeWalker>(
V8ClassIndex::TREEWALKER, args.Holder());
- OwnPtr<ExceptionContext> context(new ExceptionContext());
- RefPtr<Node> result = treeWalker->previousSibling(context.get());
- if (context->hadException()) {
- v8::ThrowException(context->exception());
+ ExceptionContext context(NULL);
+ RefPtr<Node> result = treeWalker->previousSibling(&context);
+ if (context.hadException()) {
+ v8::ThrowException(context.data());
return v8::Undefined();
}
if (!result) return v8::Null();
@@ -3118,14 +3118,14 @@
V8ClassIndex::NODEITERATOR, args.Holder());
ExceptionCode ec = 0;
- OwnPtr<ExceptionContext> context(new ExceptionContext());
- RefPtr<Node> result = nodeIterator->nextNode(context.get(), ec);
+ ExceptionContext context(NULL);
+ RefPtr<Node> result = nodeIterator->nextNode(&context, ec);
if (ec != 0) {
V8Proxy::SetDOMException(ec);
return v8::Null();
}
- if (context->hadException()) {
- v8::ThrowException(context->exception());
+ if (context.hadException()) {
+ v8::ThrowException(context.data());
return v8::Undefined();
}
if (!result) return v8::Null();
@@ -3138,14 +3138,14 @@
V8ClassIndex::NODEITERATOR, args.Holder());
ExceptionCode ec = 0;
- OwnPtr<ExceptionContext> context(new ExceptionContext());
- RefPtr<Node> result = nodeIterator->previousNode(context.get(), ec);
+ ExceptionContext context(NULL);
+ RefPtr<Node> result = nodeIterator->previousNode(&context, ec);
if (ec != 0) {
V8Proxy::SetDOMException(ec);
return v8::Null();
}
- if (context->hadException()) {
- v8::ThrowException(context->exception());
+ if (context.hadException()) {
+ v8::ThrowException(context.data());
return v8::Undefined();
}
if (!result) return v8::Null();
« no previous file with comments | « webkit/port/bindings/v8/ExceptionContextData.h ('k') | webkit/port/bindings/v8/v8_nodefilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698