diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-08-14 16:24:29 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-08-16 18:15:21 +0000 |
commit | 63b2fc7e0248d2112935775f52027a018b9aa737 (patch) | |
tree | e3ebd1a5cc18317ee6fc1204fe04a141ac4a6421 /fxjs/fxjs_v8_embeddertest.cpp | |
parent | b370e5a8f8df8cd6827ddb99b958d6a00642035e (diff) | |
download | pdfium-63b2fc7e0248d2112935775f52027a018b9aa737.tar.xz |
Check for possible empty object returns from NewFxDynamicObj()
Avoid some potential crashiness.
TBR=jochen@chromium.org
Bug: 754610
Change-Id: Ie8143c1909df7ba5783b7d20b61e31f093d04b34
Reviewed-on: https://pdfium-review.googlesource.com/10970
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/fxjs_v8_embeddertest.cpp')
-rw-r--r-- | fxjs/fxjs_v8_embeddertest.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fxjs/fxjs_v8_embeddertest.cpp b/fxjs/fxjs_v8_embeddertest.cpp index 4d05a20bf9..5a8ee63bea 100644 --- a/fxjs/fxjs_v8_embeddertest.cpp +++ b/fxjs/fxjs_v8_embeddertest.cpp @@ -192,6 +192,7 @@ TEST_F(FXJSV8EmbedderTest, NewObject) { v8::Context::Scope context_scope(GetV8Context()); auto object = engine()->NewFxDynamicObj(-1); + ASSERT_FALSE(object.IsEmpty()); EXPECT_EQ(0u, engine()->GetObjectPropertyNames(object).size()); EXPECT_FALSE(engine()->GetObjectProperty(object, L"clams").IsEmpty()); EXPECT_TRUE(engine()->GetObjectProperty(object, L"clams")->IsUndefined()); |