Don't call RenderObject::enclosingLayer on a null pointer

In C++, it's not legal to call member functions on objects that are null
pointers.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/215773002

git-svn-id: svn://svn.chromium.org/blink/trunk@170245 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Oilpan: Prepare to move DatabaseContext to Oilpan heap.

We need to change
  HashMap<ExecutionContext*, RefPtr<DatabaseContext>>
to
  HashMap<ExecutionContext*, OwnPtr<Persistent<DatabaseContext>>>
Because we can't use PersistentHeapHashMap due to mutiple threads, and can't put
Persistent<> to HashMap directly.

BUG=347902

Review URL: https://codereview.chromium.org/215063005

git-svn-id: svn://svn.chromium.org/blink/trunk@170246 bbb929c8-8fbe-4397-9dbb-9b2b20218538