Improvements to v8::Persistent usage (issue #1001):

- Remove V8_USE_UNSAFE_HANDLES dependency.
- Don't create persistent handles for primitive types.
- Don't create persistent handles for stack traces.
- CefV8Value::IsObject() no longer returns true for Date types.
- Fix V8Test.ContextEntered test flakiness.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1293 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2013-06-26 22:33:44 +00:00
parent db530ec5e3
commit 947a99d592
4 changed files with 516 additions and 303 deletions

View File

@@ -364,7 +364,6 @@ class V8RendererTest : public ClientApp::RenderDelegate {
CefRefPtr<CefV8Value> value = CefV8Value::CreateDate(date);
EXPECT_TRUE(value.get());
EXPECT_TRUE(value->IsDate());
EXPECT_TRUE(value->IsObject());
EXPECT_EQ(date.GetTimeT(), value->GetDateValue().GetTimeT());
// Exit the V8 context.
@@ -377,6 +376,7 @@ class V8RendererTest : public ClientApp::RenderDelegate {
EXPECT_FALSE(value->IsFunction());
EXPECT_FALSE(value->IsInt());
EXPECT_FALSE(value->IsUInt());
EXPECT_FALSE(value->IsObject());
EXPECT_FALSE(value->IsNull());
EXPECT_FALSE(value->IsString());
@@ -1995,7 +1995,7 @@ class V8TestHandler : public TestHandler {
}
} else {
const std::string& url = frame->GetURL();
if (url != kV8NavTestUrl &&
if (url != kV8NavTestUrl && url != kV8ContextParentTestUrl &&
url.find("http://tests/") != std::string::npos) {
// Run the test.
CefRefPtr<CefProcessMessage> return_msg =